Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing an alternate subnet via a secondary NIC

Status
Not open for further replies.

bgnnr

Technical User
Oct 17, 2007
5
US
hello All,

I have hit a wall,

I have a system with one primary interface and I am trying to setup a secondary interface

lets call the primary: 115.112.111.55
secondry: 115:112:110.55
gateway for new interface : 115.112.110.1


what I have done so far:

I have plumbed and brought the second interface: e1000g1

ifconfig e1000g1 plumb
ifconfig e1000g1 inet 115:112:110.1 netmask 255.255.255.0 up

I have put a hostname entry in the /etc/hostname.e1000g1 file
I have put an entry in the /etc/netmasks:
115:112:110.0 255.255.255.0

I manually added a route using route add: (this is where I may be going astray)

#route add -net 115.112.110.0 115.112.110.1 (second ip is my gatway)
granted I have tried every sequence allowed...

I do not know if I forgot anything, but I can not get to my machine from another subnet.

it's alternate name is in DNS with a coorilating ip.

If I log onto a server that is on the 115.112.110.x subnet, I can access my server via its secondary NIC.

thanks for all the help
 
ok, so maybe my ifconfig is wrong.

i just realized that when I had the secondary interface up, I am not able to get to my primary interface (primary hostname) from servers on the subnet I am attempting to configure.

so

servers on the 115.112.110.x subnet, usually can connect to the primary server name via ssh, but once I brought up the second interface, it fails. I unplumbed the second interface, and BAMM, it works again. I seem to have some mis configuration issues here

I'm lost here.
 
Be sure that you don't have 2 defaults gateway, you can only have one default gateway.

What is the output off "netstat -rn"?
 
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
115.112.110.0 115.112.110.121 U 1 3 e1000g1
115.112.111.0 115.112.111.13 U 1 49 e1000g0
224.0.0.0 115.112.111.13 U 1 0 e1000g0
default 115.112.111.1 UG 1 235
127.0.0.1 127.0.0.1 UH 5 81 lo0
 
Some suggestions -

do a snoop on both interfaces to see what traffic you are seeing

snoop -rd hme0 ( or whatever interface you are using )

traceroute to an ip on both subnets to see what path it's taking.
 
when I do a traceroute route, I get

: Warning: Multiple interfaces found; using 115.112.110.121 @ e1000g1
traceroute to 115.112.110.66 (115.112.110.66), 30 hops max, 40 byte packets
1 servername.com (115.112.110.66) 3.079 ms 0.708 ms 0.549 ms
root@[/] (28)#

same results for the primary interface which is e1000g0


when I snoop I see traffic from the interface I am attempting to connect to, I do not see to much from my primary interface, but that is to be expected because there is not too many server on it.


Is my route add command correct or am I bringing up the second interface correctly.

What seems kind of weird is once I bring up the second interface, I can not ssh to the primary interface's ( hostname) from a host on the subnet I am attempting to configure. If I disable the interface, I can connect as I would expect.

thank you for all your help
 
a real stumper is why would bringing up an interfaace like this:


ifconfig hme1plumb
ifconfig hme1 <ip Address> netmask 255.255.255.0 up


lets say the ip address is 10.2.2.50
if I log on to another server on the 10.2.2 vlan and attempt to ssh to the hostname that is tied to hme0, which is a different vlan, it will not connect, once I bring down that interface I just previously brought up for hme1, it connects just fine.
 
In my opinion you don't need a static route.

Traffic meant for subnet on nic1 will go to nic1 and traffic meant for subnet on nic2 will go to nic2 automatically.

Any other out bound traffic will be sent to the default gateway.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top