Networking Forums

Networking Forums > Computer Networking > Linux Networking > getting two subnets on the same ethernet adapter

Reply
Thread Tools Display Modes

getting two subnets on the same ethernet adapter

 
 
Rahul
Guest
Posts: n/a

 
      06-30-2010, 10:08 PM
I have ethernet adapters that have twin MAC addresses: one for the regular
use and the other for a Baseboard Management Controller (IPMI) that can be
used to reboot hung machines etc.

All my normal eth cards are assigned to a 10.0.x.x network by DHCP. So far
so good.

Now if I try to set the second IP address to something in the 10.0.x.x
range then things work. Say 10.0.5.3. I can ping the same physical server
(and the same physical card) on twin IP addresses from any remote machine.

arp from the remote pinging machine shows:
Address HWaddress Flags Mask Iface
10.0.0.3 00:26:B9:58:E6:46 C eth0
10.0.4.3 00:26:B9:58:E6:48 C eth0

10.0.0.3 is the normal ethernet IP assigned via DHCP and 10.0.4.3 is for
the BMC.

But let's say I wanted the BMC to respond on the 172.16.x.x subnet. I can
set this address fine. Say, 172.16.0.3 But if I try to ping 172.16.0.3 then
there is no response.

Surprisingly, arp still shows both addresses but the remote ping does not
work.

Address HWaddress Flags Mask Iface
10.0.0.3 00:26:B9:58:E6:46 C eth0
172.16.0.3 00:26:B9:58:E6:48 C eth0

Do I have to do something else to make this work? How do I have two subnets
on the same adapter?

--
Rahul
 
Reply With Quote
 
 
 
 
Rahul
Guest
Posts: n/a

 
      06-30-2010, 10:42 PM
David Schwartz <(E-Mail Removed)> wrote in
news:7af58078-aa68-45c3-a04c-(E-Mail Removed):

>
> Did you properly configure the BMC with a default route, netmask, and
> so on?


Yup. I think so.

ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 172.16.0.3
ipmitool lan set 1 netmask 255.255.0.0

I think this was sucessful because the same set of steps do work if I just
change the 172.16.0.3 to 10.0.4.3.

Also, even if I use the 172.16.0.3 subnet the arp on the remote machine
does recognise the correct mapping between the IP and the MAC.

i.e. arp figures out that 172.16.0.3 is associated with 00:26:B9:58:E6:48
(the right MAC)

There is one thing that I wasn't sure about though: "the default gateway".
Not sure what to set it to. i.e. in the command

ipmitool lan set 1 defgw ipaddr ??
ipmitool lan set 1 defgw netmask ??

But I was thinking that was not really required since when I use the
10.0.x.x subnet it just works without setting this.

--
Rahul
 
Reply With Quote
 
Rahul
Guest
Posts: n/a

 
      06-30-2010, 10:48 PM
Enrico <(E-Mail Removed)> wrote in news:4c2bc51a$0$31372
$(E-Mail Removed):

> I think you should assign an IP of 172.16.0.0 network on the same
> interface. Eg.
>
> ifconfig eth0:1 172.16.0.4/16
>
> (you can use " netmask 255.255.0.0" in place of /16)
>
> man ifconfig
>


Thanks Enrico! But that assignment is already being done by the ipmi
commands. Should I be doing it again at the kernel level?


--
Rahul
 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      06-30-2010, 11:15 PM
Rahul <(E-Mail Removed)> wrote:
> David Schwartz <(E-Mail Removed)> wrote in
> news:7af58078-aa68-45c3-a04c-(E-Mail Removed):


> > Did you properly configure the BMC with a default route, netmask,
> > and so on?


> Yup. I think so.


> ipmitool lan set 1 ipsrc static
> ipmitool lan set 1 ipaddr 172.16.0.3
> ipmitool lan set 1 netmask 255.255.0.0


> I think this was sucessful because the same set of steps do work if
> I just change the 172.16.0.3 to 10.0.4.3.


> Also, even if I use the 172.16.0.3 subnet the arp on the remote
> machine does recognise the correct mapping between the IP and the
> MAC.


Keep in mind that routing is symmetric - for traffic to be exchanged
not only does System A need to know how to reach System B, System B
needs to know how to reach System A. The above simply suggests that
your remote machine is configured for Proxy ARP and knows how to reach
your BMC. It says nothing about your BMC knowing how to reach your
remote system.

> i.e. arp figures out that 172.16.0.3 is associated with 00:26:B9:58:E6:48
> (the right MAC)


> There is one thing that I wasn't sure about though: "the default gateway".
> Not sure what to set it to. i.e. in the command


> ipmitool lan set 1 defgw ipaddr ??
> ipmitool lan set 1 defgw netmask ??


> But I was thinking that was not really required since when I use the
> 10.0.x.x subnet it just works without setting this.


Ostensibly the stack in the BMC will assume that anything other than
172.16.X.X is remote and will want to use a gateway to reach it. If
there is no (default) gateway, the IP code in the BMC stack will not
now how to get back to anything outside of 172.16.X.X.

That the system from which you are pinging gets an IP/MAC mapping in
the ARP table suggests it is using its own local IP address as the
default gateway and relying on Proxy ARP.

You could try that - setting the default gateway in the BMC to the
BMC's own local IP and have it rely on Proxy ARP too. Otherwise, I
suspect you will need to find another system in the 172.16.X.X subnet
to act as a gateway.

rick jones
--
It is not a question of half full or empty - the glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
 
Rahul
Guest
Posts: n/a

 
      06-30-2010, 11:51 PM
Rick Jones <(E-Mail Removed)> wrote in news:i0gj74$u3r$1
@usenet01.boi.hp.com:

What you say makes a lot of sense, Rick! Thanks!

> That the system from which you are pinging gets an IP/MAC mapping in
> the ARP table suggests it is using its own local IP address as the
> default gateway and relying on Proxy ARP.
>

This may have to do with the fact that on the remote system I explicitly
told it to by doing:

route add -net 172.16.0.0 netmask 255.255.0.0 dev eth0

[sorry forgot to mention this earlier]

Maybe the solution is that on the system I am trying to ping I will set up
a similar route and then just like you suggested set the gateway to itself
in the BMC. Let me check!


--
Rahul
 
Reply With Quote
 
Denis McMahon
Guest
Posts: n/a

 
      07-01-2010, 12:12 AM
On 30/06/10 23:42, Rahul wrote:

> But I was thinking that was not really required since when I use the
> 10.0.x.x subnet it just works without setting this.


All the machines involved need to know that they're in both subnets.

The target machine might know about the second subnet from the
specialist controller setup, but what about the other machine that
you're using to control it with? It also needs to know about the second
subnet.

e.g. I could tell the webserver on my lan to listen to ip addresses in
multiple subnets, but I can't browse to those ip addresses from my
desktop or laptop machines unless I also tell those machines about the
subnets and how to talk to them, otherwise they just try and send the
data to my router, which gets totally confused because it has no route
to reach private subnet space.

Rgds

Denis McMahon
 
Reply With Quote
 
Jan Kandziora
Guest
Posts: n/a

 
      07-01-2010, 12:17 AM
Rahul schrieb:
>
> i.e. arp figures out that 172.16.0.3 is associated with 00:26:B9:58:E6:48
> (the right MAC)
>

I would expect the ping is getting into 172.16.0.3, but the pong cannot be
received correctly by the machine which issued the ping.


> There is one thing that I wasn't sure about though: "the default gateway".
> Not sure what to set it to. i.e. in the command
>
> ipmitool lan set 1 defgw ipaddr ??
> ipmitool lan set 1 defgw netmask ??
>

Should be irrelevant as long you don't route the ping from/to outside
through a router.


> But I was thinking that was not really required since when I use the
> 10.0.x.x subnet it just works without setting this.
>

First check the machine issuing the ping. Maybe it's something wrong there,
e.g. firewall setting.

Kind regards

Jan
 
Reply With Quote
 
Rahul
Guest
Posts: n/a

 
      07-01-2010, 12:20 AM
Denis McMahon <(E-Mail Removed)> wrote in news:4c2bdd8a$0
$6720$(E-Mail Removed):

> All the machines involved need to know that they're in both subnets.
>
> The target machine might know about the second subnet from the
> specialist controller setup, but what about the other machine that
> you're using to control it with? It also needs to know about the second
> subnet.
>


Thanks Denis! On the controlling machine I did:

route add -net 172.16.0.0 netmask 255.255.0.0 dev eth0

Shouldn't that be sufficient? Or do I need to do something else?

Furthermore on the controlling machine the arp tables are so:

Address HWaddress Flags Mask Iface
10.0.0.3 00:26:B9:58:E6:46 C eth0
172.16.0.3 00:26:B9:58:E6:48 C eth0

To me it looked like then the controlling machine seems to know where
172.16.0.3 is. Maybe I am wrong?

Also, these are the routing tables on the controlling machine:

Kernel IP routing table
DestinationGateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.0.0 U 0 0 0 eth0
172.16.0.0 * 255.255.0.0 U 0 0 0 eth0
default euadmin.che.wis 0.0.0.0 UG 0 0 0 eth0



--
Rahul
 
Reply With Quote
 
Rahul
Guest
Posts: n/a

 
      07-01-2010, 12:26 AM
Jan Kandziora <(E-Mail Removed)> wrote in news:i0gmof$7gl$(E-Mail Removed):

Thanks Jan!

> I would expect the ping is getting into 172.16.0.3, but the pong
> cannot be received correctly by the machine which issued the ping.


I agree. That seems what I think too based on Rick's comments. Is there a
way to find if the BMC ever issued a pong or not? Maybe a tcpdump would
show? But I am not sure of what the packet dump command should be to trap
the pong.

Something like this?

tcpdump -c 100 -ennqti eth0 \( arp or icmp \)


> Should be irrelevant as long you don't route the ping from/to outside
> through a router.


So, you think the BMC will blindly echo pongs back on the same physical net
by force. No matter what IP subnet the ping emanated from? So long as the
ping reaches the BMC it will pong back correctly?

>>

> First check the machine issuing the ping. Maybe it's something wrong
> there, e.g. firewall setting.


It doesn't have a firewall running. It can ping everywhere else. In fact it
can even ping this very same BMC so long as the BMC IP is within the
10.0.x.x subnet.

--
Rahul
 
Reply With Quote
 
Rahul
Guest
Posts: n/a

 
      07-01-2010, 12:42 AM
Rick Jones <(E-Mail Removed)> wrote in news:i0gj74$u3r$1
@usenet01.boi.hp.com:

> You could try that - setting the default gateway in the BMC to the
> BMC's own local IP and have it rely on Proxy ARP too. Otherwise, I
> suspect you will need to find another system in the 172.16.X.X subnet
> to act as a gateway.
>


Unfortunately that didn't work. I tried setting the default gateway to
the local machine:

ipmitool lan set 1 defgw ipaddr 10.0.0.3

If I try
ipmitool lan set 1 defgw ipaddr 127.0.0.1 it throws an error.

What's the ProxyARP? Does it have to be enabled in some way? Any other
sugesstions?

Of course, I can always set up a gateway machine but not sure what needs
to be done on it. Can it still have just a single eth adapter. I mean
both subnets are essentially on the same physical network anyways. In
fact, I do have a gateway machine already.

Kernel IP routing table
DestinationGateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.0.0 U 0 0 0 eth0
172.16.0.0 * 255.255.0.0 U 0 0 0 eth0
default euadmin.che.wis 0.0.0.0 UG 0 0 0 eth0


Do I just have to add some routing lines on the gateway machine then? I
tried this but doesn't seem to work:

gateway>route add -net 172.16.0.0 netmask 255.255.0.0 dev eth3


--
Rahul
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RRAS server separating two subnets - one subnet cannot reach the Internet and computers can't ping each other between subnets Spin Windows Networking 11 09-23-2008 11:06 PM
Cannot Browse from domain populated subnets to remote subnets whichcontain only workgroup servers pag@associateddynamics.com Windows Networking 4 02-14-2008 08:02 PM
Bridging Wireless and Ethernet subnets Eddy Borg Wireless Networks 2 11-16-2004 01:48 PM
Belkin PCI Ethernet adapter not in adapter list Paul Plummer Windows Networking 0 11-17-2003 01:21 AM
Difference between wireless ethernet bridge and wireless ethernet adapter James Wireless Internet 7 07-18-2003 05:12 AM



1 2 3 4 5 6 7 8 9 10 11