networking - Disable hidden bridging between network interfaces - Ask Ubuntu


my question looks duplicate this one, since has no answers, re-ask more info. please take account i'm complete beginner in networking stuff. can copy-paste, have vague understanding of what's happening)

so, have home server running ubuntu 14.04 2 nics called p2p1 (on motherboard, 100mb link) , eth0 (via pci-e, 1000mb link). , have samba share, use via eth0.

i have connected both interfaces gigabit router (ip 192.168.1.1) , using p2p1 configure server via ssh. here ifconfig output:

eth0      link encap:ethernet  hwaddr c4:e9:84:03:ee:d0           inet addr:192.168.1.112  bcast:192.168.1.255  mask:255.255.255.0           inet6 addr: fe80::c6e9:84ff:fe03:eed0/64 scope:link           broadcast running multicast  mtu:1500  metric:1           rx packets:25090 errors:0 dropped:0 overruns:0 frame:0           tx packets:41728 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           rx bytes:3306168 (3.3 mb)  tx bytes:9338018 (9.3 mb)  lo        link encap:local loopback           inet addr:127.0.0.1  mask:255.0.0.0           inet6 addr: ::1/128 scope:host           loopback running  mtu:65536  metric:1           rx packets:583385 errors:0 dropped:0 overruns:0 frame:0           tx packets:583385 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           rx bytes:105373919 (105.3 mb)  tx bytes:105373919 (105.3 mb)  p2p1      link encap:ethernet  hwaddr d0:50:99:6a:5c:5b           inet addr:192.168.1.105  bcast:192.168.1.255  mask:255.255.255.0           inet6 addr: fe80::d250:99ff:fe6a:5c5b/64 scope:link           broadcast running multicast  mtu:1500  metric:1           rx packets:48954046 errors:0 dropped:0 overruns:0 frame:0           tx packets:84807022 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           rx bytes:4101748891 (4.1 gb)  tx bytes:114444015383 (114.4 gb) 

then connect //192.168.1.112 @ windows machine , samba share opened successfully. send ~100mb file , see transfer speed around ~11mb/sec (i.e. 100mb link speed instead of 1gb). check ifconfig counters again , p2p1 increased amount of transferred data, eth0 not. loopback interface counters remain same.

looks i'm somehow using eth0 through p2p1.

another thing proves hidden bridging when plug out cable p2p1 interface (ip 192.168.1.105) cannot connect 192.168.1.112 ip address.

i googled every way check whether interfaces bridged , how disable it, no luck until moment.

the first thing check /etc/network/interfaces. nothing criminal me:

auto lo iface lo inet loopback  auto p2p1 iface p2p1 inet dhcp  auto eth0 iface eth0 inet dhcp 

i've checked ip forwarding (just in case)

$ cat /proc/sys/net/ipv4/ip_forward 0 

i've checked there no interfere gui networkmanager

$ nmcli dev status device     type              state p2p1       802-3-ethernet    unmanaged eth0       802-3-ethernet    unmanaged 

one thing don't route -n output. i'm not specialist don't know whether ok. here is:

$ route -n kernel ip routing table destination     gateway         genmask         flags metric ref    use iface 0.0.0.0         192.168.1.1     0.0.0.0         ug    0      0        0 p2p1 192.168.1.0     0.0.0.0         255.255.255.0   u     0      0        0 p2p1 192.168.1.0     0.0.0.0         255.255.255.0   u     0      0        0 eth0 

the difference between network interfaces shown ip addr command. p2p1 have ipv6 address while eth0 have not. don't know whether information relevant, though:

1: lo: <loopback,up,lower_up> mtu 65536 qdisc noqueue state unknown group default     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host        valid_lft forever preferred_lft forever 2: eth0: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state group default qlen 1000     link/ether c4:e9:84:03:ee:d0 brd ff:ff:ff:ff:ff:ff     inet 192.168.1.112/24 brd 192.168.1.255 scope global eth0        valid_lft forever preferred_lft forever     inet6 fe80::c6e9:84ff:fe03:eed0/64 scope link        valid_lft forever preferred_lft forever 3: p2p1: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state group default qlen 1000     link/ether d0:50:99:6a:5c:5b brd ff:ff:ff:ff:ff:ff     inet 192.168.1.105/24 brd 192.168.1.255 scope global p2p1        valid_lft forever preferred_lft forever     inet6 fe80::d250:99ff:fe6a:5c5b/64 scope link        valid_lft forever preferred_lft forever 

i don't know else check , configure. thoughts?

i think see problem in here. since both of interfaces on same subnet , using dhcp. can have 1 gateway per subnet. output of route command, host using default route via p2p1 (if not wanted) instead of eth0.

$ route -n kernel ip routing table destination     gateway         genmask         flags metric ref    use iface 0.0.0.0         192.168.1.1     0.0.0.0         ug    0      0        0 p2p1 

i assuming since both interfaces using dhcp, whatever interface came first , got dhcp lease information prior one, assigned gateway , based on information, linux created default route through device. unless manually altered.

if willing use eth0 operations, have change default route through eth0. reason why seeing counters increasing on p2p interface since default route device, entering or leaving hit interface.

in short:

  • change default route entry dev eth0. test if works expected. else:
  • change ips static instead of dhcp , define gateway eth0. assuming want use ssh same subnet, on p2p interface. , alter routing table again.

here can find tutorial add route.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User