Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to disconnect eth0 and eth1 from each other?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
roterstern
n00b
n00b


Joined: 16 Nov 2004
Posts: 36

PostPosted: Wed Feb 22, 2006 6:00 pm    Post subject: How to disconnect eth0 and eth1 from each other? Reply with quote

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
View user's profile Send private message
kands
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2003
Posts: 138
Location: Vancouver Island, Canada

PostPosted: Wed Feb 22, 2006 7:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
roterstern
n00b
n00b


Joined: 16 Nov 2004
Posts: 36

PostPosted: Thu Feb 23, 2006 12:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Feb 23, 2006 1:11 pm    Post subject: Reply with quote

Don't you want to create a bridge and then add eth0 and eth1 to it?

Readup on bridging in /etc/conf.d/net.example

Or you may want bonding.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
kands
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2003
Posts: 138
Location: Vancouver Island, Canada

PostPosted: Thu Feb 23, 2006 4:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum