add a 2nd gateway on a host

  • Follow


Hello,


I have 2 server on my LAN but they are NOT belong to the same network,
so how can i manage to discuss each other other...
how can i do to add a second gateway on my host

server 1
***********
ip : 172.16.1.2
gw :172.16.0.1
gw2: 10.228.106.1

server2
*******
ip 10.228.106.3
gw 10.228.106.1

what is the right synthax to "route add" for adding the 2nd gateway?
i ve always

/etc/defaultrouter is with 1rst gateway

thanks a lot for your support

Ps : i ve heard to use ifconfig plumb...what does it mean?

0
Reply patrice 6/15/2005 4:10:16 AM

In article <42afaa24$0$10116$626a14ce@news.free.fr>, patrice@nospam.org 
says...
> Hello,
> 
> 
> I have 2 server on my LAN but they are NOT belong to the same network,
> so how can i manage to discuss each other other...
> how can i do to add a second gateway on my host
> 
> server 1
> ***********
> ip : 172.16.1.2
> gw :172.16.0.1
> gw2: 10.228.106.1
> 
> server2
> *******
> ip 10.228.106.3
> gw 10.228.106.1
> 
> what is the right synthax to "route add" for adding the 2nd gateway?
> i ve always
> 
> /etc/defaultrouter is with 1rst gateway
> 
> thanks a lot for your support
> 
> Ps : i ve heard to use ifconfig plumb...what does it mean?
> 
> 
If you can ping either system from the other you don't have to do anything 
else. 
If you can not ping then you need to look at some other items first like: 
1. Are the IP's correct. Are the IP's shown real for server 2? If they are, 
that address range is not routable. Read 
http://www.easydesksoftware.com/news/news28.htm.
2. Is the second network isolated from the world? If so, should you connect 
the two together? If yes then you need another network connect on the first 
server to connect the second network directly to it.

ifconfig plumb is used to discover and prepare network interfaces for use.

-- 
Mike Miller
If all else fails - READ THE INSTRUCTIONS!
or if you like
"If all else fails - THROW HARDER" Robert Smith(pro bowler)
0
Reply Mike 6/15/2005 12:06:56 PM


patrice DFC wrote:
> Hello,
>
>
> I have 2 server on my LAN but they are NOT belong to the same network,
> so how can i manage to discuss each other other...
> how can i do to add a second gateway on my host
>
> server 1
> ***********
> ip : 172.16.1.2
> gw :172.16.0.1
> gw2: 10.228.106.1
>
> server2
> *******
> ip 10.228.106.3
> gw 10.228.106.1
>
> what is the right synthax to "route add" for adding the 2nd gateway?
> i ve always

If these two systems are attached to the same L2 switch and the closest

L3 switch/router doesn't  know about it I'd say that the router is
not correctly configured.

  You can fix this by configureing the router so that it is aware
  that the 10.228.106.0  network exists on the same I/F  as
  the 172.16.0.0  network.

 Alternatively you will need to activate an additional IP address
 on one of the servers . I.e.  configure  address 10.228.106.4  on
server1.
 If you interface name is bge0

  # ifconfig bge0:1 plumb 10.228.106.4  netmask 255.255.255.0  up

  Then both servers will have access to the same subnet.10.228.106.0


NOTE:  It is not possible to have  TWO default gateways.
       There can only be one default Gateway.

//Lars

0
Reply tunla 6/15/2005 6:30:54 PM


Mike Miller wrote:
>
> If you can ping either system from the other you don't have to do anything
> else.
> If you can not ping then you need to look at some other items first like:
> 1. Are the IP's correct. Are the IP's shown real for server 2? If they are,
> that address range is not routable. Read
> http://www.easydesksoftware.com/news/news28.htm.

Ofcourse the address IS routable,  it is the responsibility of all
ISP's
everywhere to see to that these addresses are NOT routed to the
Internet,
BOTH 172.16.x.x  and 10.x.x.x  are private non-internet networks.


> 2. Is the second network isolated from the world? If so, should you connect
> the two together? If yes then you need another network connect on the first
> server to connect the second network directly to it.


 Well the OP stated that the two server was on "my LAN" 

//Lars

0
Reply tunla 6/15/2005 6:44:16 PM

tunla wrote:
[ snip] ...
> 
> NOTE:  It is not possible to have  TWO default gateways.
>        There can only be one default Gateway.
> 
> //Lars
> 

Not strictly true...

# netstat -rvn

IRE Table: IPv4
   Destination             Mask           Gateway          Device Mxfrg
-------------------- --------------- -------------------- ------ -----
42.17.111.0          255.255.255.128 42.17.111.5          elxl1   1500*
192.168.1.0          255.255.255.0   192.168.1.81         rtls0   1500*
224.0.0.0            240.0.0.0       192.168.1.81         rtls0   1500*
default              0.0.0.0         192.168.1.1                  1500*
127.0.0.1            255.255.255.255 127.0.0.1            lo0     8232*

# route add default 42.17.111.1
add net default: gateway 42.17.111.1
# netstat -rvn

IRE Table: IPv4
   Destination             Mask           Gateway          Device Mxfrg
-------------------- --------------- -------------------- ------ -----
42.17.111.0          255.255.255.128 42.17.111.5          elxl1   1500*
192.168.1.0          255.255.255.0   192.168.1.81         rtls0   1500*
224.0.0.0            240.0.0.0       192.168.1.81         rtls0   1500*
default              0.0.0.0         192.168.1.1                  1500*
default              0.0.0.0         42.17.111.1                  1500*
127.0.0.1            255.255.255.255 127.0.0.1            lo0     8232*

(text below is from INFODOC ID: 17516)

SYNOPSIS: How does multiple default routes work ( 2 static defaultrouter 
entries) ? Multiple default routes (wildcards) is a special case, they will be 
used in a round-robin fashion. Network connections will alternate between the 
default routers unless one is down, in which case it may take a few seconds to 
pick up the next default route. IREs( internal routing entries) are selected in 
a alternating fashion and that once selected, they are cached and the IRE entry 
is used for subsequent packets until it is flushed at ip_ire_flush_interval time 
(default 20 minutes) Multiple IRE entries are created by packets using the 
different default routes, which can be observed with " netstat -ra ". What 
happens if one of the default routers goes off-line? The TCP module on the 
gateway will attempt to resend the packet to that failed router based upon 
tcp_ip_notify_cinterval = 10 seconds (timeout value when TCP is performing an 
active open after which, TCP notifies IP to find a new route OR 
tcp_ip_notify_interval = 2 min (timeout value for an ESTABLISHED connection 
after which TCP notifies IP to find a new route. What happens if the default 
router looses the route? If the default router is up, and the route that it 
would use to forward the packet is not available and the router knows this, then 
the router should send back to your gateway an ICMP redirect, which should 
specify the IP address of one of your other default routers.
0
Reply Robert 6/15/2005 9:36:57 PM


Robert Lawhead wrote:
>
>
> SYNOPSIS: How does multiple default routes work ( 2 static defaultrouter
> entries) ? Multiple default routes (wildcards) is a special case, they will be
> used in a round-robin fashion. Network connections will alternate between the
> default routers unless one is down, in which case it may take a few seconds to
> pick up the next default route. IREs( internal routing entries) are selected in
> a alternating fashion and that once selected, they are cached and the IRE entry
> is used for subsequent packets until it is flushed at ip_ire_flush_interval time


  Yes  -  but this is a redundancy feature.
 The user have no control over when a specific ROUTEER is used.
 Also the two router needs to be using one or several Routing protocols
to
 update each other continusly about witch routes are avaliable to which
router
 in order to be able to intelligently refer a packet to the other
router using ICMP redirects.  If the OP had routing protocols going in
his LAN his
problem would never have arisen, as OSPF would have known where to send
his packets.

  //LArs

0
Reply tunla 6/15/2005 10:36:31 PM

5 Replies
814 Views

(page loaded in 0.002 seconds)

Similiar Articles:













7/22/2012 1:32:53 PM


Reply: