Find the answer to your Linux question:
Results 1 to 9 of 9
I just installed second ethernet card to my Ubuntu linux. And on second interface (eth0) I am running dhcpd for wifi AP. On eth1 I am using my company LAN. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Posts
    8

    Question 2 NIC and SMB problem?


    I just installed second ethernet card to my Ubuntu linux. And on second interface (eth0) I am running dhcpd for wifi AP. On eth1 I am using my company LAN. Problem is when eth0 is active i can't see computer on my company lan via smb, only AP computer.

    When eth0 is switched off everything is fine.
    In smb.conf :
    interfaces = 127.0.0.0/8 eth1 eth0


    and ifconfig gives:
    eth0 Link encap:Ethernet HWaddr 00:50A:4C:82:FB
    inet addr:192.168.2.2 Bcast:194.223.199.255 Mask:255.255.255.0
    inet6 addr: fe80::250:daff:fe4c:82fb/64 Scope:Link
    UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1
    RX packets:4919 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3367 errors:0 dropped:0 overruns:0 carrier:0
    collisions:51 txqueuelen:1000
    RX bytes:1087097 (1.0 MiB) TX bytes:385966 (376.9 KiB)
    Interrupt:11 Base address:0xe800

    eth1 Link encap:Ethernet HWaddr 00:12:17:4D:E1:FB
    inet addr:194.223.199.3 Bcast:194.223.199.255 Mask:255.255.255.0
    inet6 addr: fe80::212:17ff:fe4d:e1fb/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:29159 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:9779 dropped:0 overruns:0 carrier:19541
    collisions:0 txqueuelen:1000
    RX bytes:8211200 (7.8 MiB) TX bytes:0 (0.0 b)
    Interrupt:9 Base address:0xd800



    Strange is that Bcast address from eth0??
    But i don know how to change it.

    Thanks for help
    krzysiek

  2. #2
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Location
    Maryland, USA
    Posts
    510
    You're right, the bcast address of eth0 is the same as eth1, which is wrong.

    Look in /etc/sysconfig/network-scripts/ifcfg-eth0 for this line:
    BROADCAST=194.223.199.255

    Change it to:
    BROADCAST=192.168.2.255

    Then do something like this to get it to take effect:
    # service network restart

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    8
    Thanks.
    That was exactly what I wanted to do but didn't know where. I'm running Ubuntu so it was a bit different but enough similar to what you wrote.

    I had to edit:
    /etc/network/interfaces
    And restart was :
    /etc/init.d/networking restart

    And now everything is excellent.
    THX

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jun 2006
    Posts
    8

    Angry

    But now I am having different problem. Everything is finel for first cuple seconds.
    After some period (1 min) a can't see any computer.

  6. #5
    Just Joined!
    Join Date
    Jun 2006
    Posts
    8
    But now I am having different problem. Everything is finel for first cuple seconds.
    After some period (1 min) a can't see any computer.


    /etc/network/interfaces:

    iface eth0 inet static
    address 192.168.2.2
    netmask 255.255.255.0
    network 192.168.2.0
    broadcast 192.168.2.255
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 194.223.199.220
    dns-search cgi.co.uk
    auto eth0

    iface eth1 inet static
    address 194.223.199.3
    netmask 255.255.255.0
    network 194.223.199.0
    gateway 194.223.199.65
    broadcast 194.223.199.255
    dns-nameservers 194.223.199.220
    auto eth1


    ==================================
    ifconfig:
    eth0 Link encap:Ethernet HWaddr 00:50A:4C:82:FB
    inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
    inet6 addr: fe80::250:daff:fe4c:82fb/64 Scope:Link
    UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1
    RX packets:947 errors:0 dropped:0 overruns:0 frame:0
    TX packets:681 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:447445 (436.9 KiB) TX bytes:86077 (84.0 KiB)
    Interrupt:11 Base address:0xe800

    eth1 Link encap:Ethernet HWaddr 00:12:17:4D:E1:FB
    inet addr:194.223.199.3 Bcast:194.223.199.255 Mask:255.255.255.0
    inet6 addr: fe80::212:17ff:fe4d:e1fb/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:22184 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:14647 dropped:0 overruns:0 carrier:29293
    collisions:0 txqueuelen:1000
    RX bytes:18426601 (17.5 MiB) TX bytes:0 (0.0 b)
    Interrupt:9 Base address:0xd800

  7. #6
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Location
    Maryland, USA
    Posts
    510
    Is there anything interesting in /var/log/messages after you restart?

    Does the command 'netstat -nr' show that you have a default route? I.e., something like this:
    0.0.0.0 194.223.199.65 0.0.0.0 UG 0 0 0 eth1

    When you say you, "can't see any computer," what does that mean? You can't ping any computer? Locally or remote? Can you ping the gateway computer?

  8. #7
    Just Joined!
    Join Date
    Jun 2006
    Posts
    8

    Question

    On my Company lan we have 3 workgroups. If eth0 is up i can see only 1 with 2 computers in it, after putting eth0 down the same workgroup has 28 computers and I can see 2 more work groups.

    netstat -nr (for one eth)
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    194.223.199.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    0.0.0.0 194.223.199.65 0.0.0.0 UG 0 0 0 eth1

    netstat -nr (for two eth)
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    194.223.199.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    0.0.0.0 194.223.199.65 0.0.0.0 UG 0 0 0 eth1

    THX

  9. #8
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Location
    Maryland, USA
    Posts
    510
    That is most bizarre!

    The only explanation I can think of, is there could be two different network segments with the same number, 192.168.2.0. There would also need to be a path through the 194.223.199.65 router to get to one of them. If that's the case, then when you bring up eth0, the routing entry that gets added misdirects traffic to the larger segment.

    Do any of the 28 other computers have IP addresses in the range 192.168.2.0 - 254? You can find the IP with 'ping computername'.

    If that is the case, it would be best for you and the other two computers to change your network number. You might want to do that anyway, if you can.

  10. #9
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    I don't think that the 192.168.2.0/24 is an issue, have your tried disabling IPv6 support?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •