Home Forums Getting Started (Ubuntu) Separate IPs For Each Lan

This topic contains 6 replies, has 3 voices, and was last updated by  OV 4 days, 12 hours ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1280

    OV
    Participant

    Hello, and thank you in advance for any all assistance you may lend. I’ve gotten as far as installing Ubuntu and getting the network up and running (thanks to all you who have posted out here). I am wishing to have different IP addresses for each of the LAN ports. Right now, I can get two IP addresses, but they’re both responding on the same physical RJ-45 connection. Meaning, if I unplug my cable, and plug it into the other LAN port, neither of the IP addresses respond to pings. Below is my /etc/network/interfaces file:

    
    # interfaces(5) file used by ifup(8) and ifdown(8)
    # Include files from /etc/network/interfaces.d:
    source-directory /etc/network/interfaces.d
    
    auto eth0
    iface eth0 inet manual
    
    auto lo
    iface lo inet loopback
    
    #auto wan
    #iface wan inet dhcp
    #pre-up /sbin/ifconfig eth0 up
    
    auto lan1
    iface lan1 inet static
    address 192.168.0.20
    netmask 255.255.0.0
    network 192.168.0.0
    broadcast 192.168.255.255
    gateway 192.168.0.1
    dns-nameservers 8.8.8.8 8.8.4.4
    #pre-up /sbin/ifconfig lan1 up
    pre-up /sbin/ifconfig eth0 up
    
    auto lan0
    iface lan0 inet static
    address 192.168.0.21
    netmask 255.255.0.0
    network 192.168.0.0
    #broadcast 192.168.255.255
    gateway 192.168.0.1
    dns-nameservers 8.8.8.8 8.8.4.4
    pre-up /sbin/ifconfig lan0 up
    

    Again, I very much appreciate any and all help with getting this feature enabled.

    #1282

    OV
    Participant

    … and I guess to clarify things a bit, I ran ‘arp -a’ from a remote machine and confirm that both addresses are responding with the same MAC address, even though both RJ-45 ports are plugged in.

    
    ? (192.168.0.21) at f0:ad:4e:03:87:07 [ether] on eth0
    ? (192.168.0.20) at f0:ad:4e:03:87:07 [ether] on eth0
    
    #1283

    chris
    Participant

    Have you checked what mac address are associated with each interface?
    Do lan0 and lan1 both have that same mac?

    #1284

    Trblz
    Participant
    auto lan0
    iface lan0 inet static
    address 192.168.0.21
    netmask 255.255.0.0
    network 192.168.0.0
    #broadcast 192.168.255.255
    gateway 192.168.0.1
    dns-nameservers 8.8.8.8 8.8.4.4
    pre-up /sbin/ifconfig lan0 up

    should this not be
    pre-up /sbin/ifconfig eth0 up

    ?

    #1285

    OV
    Participant

    Chris, thank you for replying. Yes, they all have the same MAC addy.

    > ifconfig -a | grep HWaddr

    bond0 Link encap:Ethernet HWaddr a2:16:b6:2b:f2:c4
    eth0 Link encap:Ethernet HWaddr f0:ad:4e:03:87:07
    lan0 Link encap:Ethernet HWaddr f0:ad:4e:03:87:07
    lan1 Link encap:Ethernet HWaddr f0:ad:4e:03:87:07
    wan Link encap:Ethernet HWaddr f0:ad:4e:03:87:07

    [BREAK]

    Trblz, thank you for replying too. Yes, that was the result of me trying to get the thing to work. I find success with “pre-up /sbin/ifconfig eth0 up”, but both IP addresses are still assigned to the left-most RJ45 port. No response on the middle port.

    #1286

    OV
    Participant

    … furthermore

    > lshw

    
      *-network:0
           description: Ethernet interface
           physical id: 4
           logical name: eth0
           serial: f0:ad:4e:03:87:07
           size: 1Gbit/s
           capacity: 1Gbit/s
           capabilities: ethernet physical tp mii 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=mvneta driverversion=1.0 duplex=full link=yes multicast=yes port=MII speed=1Gbit/s
      *-network:1 DISABLED
           description: Ethernet interface
           physical id: 5
           logical name: bond0
           serial: a2:16:b6:2b:f2:c4
           capabilities: ethernet physical
           configuration: autonegotiation=off broadcast=yes driver=bonding driverversion=3.7.1 firmware=2 link=no master=yes multicast=yes
      *-network:2
           description: Ethernet interface
           physical id: 6
           logical name: lan0
           serial: f0:ad:4e:03:87:07
           size: 10Mbit/s
           capacity: 1Gbit/s
           capabilities: ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=dsa driverversion=0.1 duplex=half firmware=N/A ip=192.168.0.21 link=no multicast=yes port=MII speed=10Mbit/s
      *-network:3 DISABLED
           description: Ethernet interface
           physical id: 7
           logical name: wan
           serial: f0:ad:4e:03:87:07
           size: 10Mbit/s
           capacity: 1Gbit/s
           capabilities: ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=dsa driverversion=0.1 duplex=half firmware=N/A link=no multicast=yes port=MII speed=10Mbit/s
      *-network:4
           description: Ethernet interface
           physical id: 8
           logical name: lan1
           serial: f0:ad:4e:03:87:07
           size: 100Mbit/s
           capacity: 1Gbit/s
           capabilities: ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=dsa driverversion=0.1 duplex=full firmware=N/A ip=192.168.0.20 link=yes multicast=yes port=MII speed=100Mbit/s
    
    #1301

    OV
    Participant

    and here is my settings from printenv

    
    eth1addr=00:00:00:00:51:82                                                                                                                                                                                                                 
    eth2addr=00:00:00:00:51:83                                                                                                                                                                                                                 
    ethact=neta0                                                                                                                                                                                                                               
    ethaddr=F0:AD:4E:03:87:07                                                                                                                                                                                                                  
    ethprime=egiga0
    
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Signup to our newsletter

Technical specification tables can not be displayed on mobile. Please view on desktop