View previous topic :: View next topic |
Author |
Message |
roterstern n00b
Joined: 16 Nov 2004 Posts: 36
|
Posted: Wed Feb 22, 2006 6:00 pm Post subject: How to disconnect eth0 and eth1 from each other? |
|
|
Hi all!
I have a network problem with two NICs in the way that I want to check a transparent managed bridge (Firewall, QoS, etc.). I seperated the two Nics with several routing informations. My routingtable:
Code: | Kernel IP Routentabelle
Ziel Router Genmask Flags MSS Fenster irtt Iface
192.168.1.3 * 255.255.255.255 UH 0 0 0 eth0
192.168.1.2 * 255.255.255.255 UH 0 0 0 eth1 |
But if I test the connection with unplugged cables I still have a connection... How can I disconnect the internal connection of eth0 and eth1?
Thanks! |
|
Back to top |
|
|
kands Tux's lil' helper
Joined: 01 Apr 2003 Posts: 138 Location: Vancouver Island, Canada
|
Posted: Wed Feb 22, 2006 7:16 pm Post subject: |
|
|
Hi,
Can you describe what you're trying to do in a bit more detail? _________________ http://www.brokenspoke.ca
Have you broken your spoke today? |
|
Back to top |
|
|
roterstern n00b
Joined: 16 Nov 2004 Posts: 36
|
Posted: Thu Feb 23, 2006 12:26 pm Post subject: |
|
|
Ok, I have two Nics in my PC. They're called eth0 and eth1. Each of them are plugged into a hardware-bridge. Also called managed switch... This piece of hardware is highly configured (Firewall, QoS, PoE, High Availbility, ...). And it's transparent (IP-no. 0.0.0.0) and won't be seen on the network! To check all these features I want to test the throughoutput of the bridge.
Code: |
Gentoo Bridge
+-------+ +-------+
| | | |
| +----+ | |
| |eth0|-----| |
| +----+ | |
| | | |
| +----+ | |
| |eth0|-----| |
| +----+ | |
| | | |
+-------+ +-------+
|
First I want just to ping 192.168.1.2 (eth0) from 192.168.1.3 (eth1) over the cableconnection. To do that I've created this routingtable:
Code: |
Ziel Router Genmask Flags MSS Fenster irtt Iface
192.168.1.0 192.168.0.1 255.255.255.0 UG 0 0 0 eth0
192.168.0.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth1
|
But even when I disconnect the cables I have a connection between them.
So, how can I establish ONLY a cable-based connection?
Thanks |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
kands Tux's lil' helper
Joined: 01 Apr 2003 Posts: 138 Location: Vancouver Island, Canada
|
Posted: Thu Feb 23, 2006 4:10 pm Post subject: |
|
|
Hi roterstern,
Do you mean that you can ping both eth0 and eth1 from your gentoo computer even when there are no ethernet cables plugged in? If so this is simply the computer being able to reach both of its ethernet adapters and does not necessarily mean that it will route between the two subnet you've defined. I'm not sure that you'd want to block the computer from being able to ping (or reach) one of its own network interfaces as that could present problems when you attempt to use those interfaces.
I believe you have two decent options:
1) Put each interface into its own subnet and disable routing between them. If you want to separate the two interfaces and disable traffic between the them you will want to make sure routing is disabled (ensure /proc/sys/net/ipv4/ip_forward only has a 0 in it).
2) As your switch is fully managed you can look at VLan's. These are not too difficult but will take some planning. By using VLan's you will have fairly granular control over which adapters / subnets can access any other given subnet on that switch or group of switches on your network. Your switch should come with documentation to assist with setting up VLan's.
You shouldn't have to define static routes if you use VLan's and I'm understanding what you're trying to do correctly.
Hope that helps. _________________ http://www.brokenspoke.ca
Have you broken your spoke today? |
|
Back to top |
|
|
|