General discussion

Locked

How to configure a LAN with 2 or more IP

By CyberGod ·
I have to PCs in my office and I need to do the following:
The first PC has 2 LAN cards with UTP cables. One of them is connected to a local HUB and the other one to the second PC I have, which is an Internet server.
How to configure the IP addresses of the two LAN cards on my PC, and this which is a server, if the OS is FreeBSD ?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to configure a LAN with 2 or more IP

by cpfeiffe In reply to How to configure a LAN wi ...

ifconfig is used to set the IP address for an interface card. Each interface card will be identified by an alphanumeric code to FreeBSD (ex. x10). Type `ifconfig x10 inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx' to set the IP address and netmask for your interface (assumed x10 in this example). If your other interface is recognized as x11 just repeat the step and replace x10 with x11, adding the appropriate IP address and netmask for that interface. You should also add a default route (route add default xxx.xxx.xxx.xxx 1) The x's are the IP address of your default gateway.

To make your change permanent edit the /etc/rc.conf file. and change the following values:
network_interfaces="auto"
(auto allows the system to find its interfaces at bootup)
ifconfig_x10="inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx"
ifconfig_x11="inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx"
defaultrouter="xxx.xxx.xxx.xxx"
(IP address for your default gateway)

Good luck

Collapse -

How to configure a LAN with 2 or more IP

by CyberGod In reply to How to configure a LAN wi ...

Poster rated this answer

Collapse -

How to configure a LAN with 2 or more IP

by CyberGod In reply to How to configure a LAN wi ...

This question was closed by the author

Back to Linux Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums