Hitchhiker's Guide to Openbsd


An example of a bridge application


Download 1.27 Mb.
Pdf ko'rish
bet100/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   96   97   98   99   100   101   102   103   ...   258
Bog'liq
obsd-faq49

An example of a bridge application
One of my computer racks has a number of older systems, none of which have a built-in 10BASE-TX 
NIC. While they all have an AUI or AAUI connector, my supply of transceivers is limited to coax. One 
of the machines on this rack is an OpenBSD-based terminal server which is always on and connected to 
the high-speed network. Adding a second NIC with a coax port will allow me to use this machine as a 
bridge to the coax network. 
This system has two NICs in it now, an Intel EtherExpress/100 (
fxp0
) and a 3c590-Combo card (
ep0

for the coax port. 
fxp0
is the link to the rest of my network and will thus have an IP address
ep0
is 
http://www.openbsd.org/faq/faq6.html (20 of 33)9/4/2011 10:02:06 AM


6 - Networking
going to be for bridging only and will have no IP address. Machines attached to the coax segment will 
communicate as if they were on the rest of my network. So, how do we make this happen? 
The file 
hostname.fxp0
contains the configuration info for the 
fxp0
card. This machine is set up 
using DHCP, so its file looks like this: 
cat /etc/hostname.fxp0
dhcp NONE NONE NONE
No surprises here. 
The 
ep0
card is a bit different, as you might guess: 
cat /etc/hostname.ep0
up media 10base2
Here, we are instructing the system to activate this interface using 
ifconfig(8)
 and set it to 10BASE-2 
(coax). No IP address or similar information needs to be specified for this interface. The options the 
ep
card accepts are detailed in its 
man page

Now, we need to set up the bridge. Bridges are initialized by the existence of a file named something 
like 
hostname.bridge0
. Here is an example for my situation here: 
cat /etc/hostname.bridge0
add fxp0
add ep0
up
This is saying set up a bridge consisting of the two NICs, fxp0 and ep0, and activate it. Does it matter 
which order the cards are listed? No, remember a bridge is very symmetrical -- packets flow in and out 
in both directions. 
That's it! Reboot, and you now have a functioning bridge. 

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   96   97   98   99   100   101   102   103   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling