Mutiple nics on Freebsd 7.0


 
Thread Tools Search this Thread
Special Forums IP Networking Mutiple nics on Freebsd 7.0
# 1  
Old 12-25-2008
Mutiple nics on Freebsd 7.0

I had the pleasure of having a gig nic given to me this week, which also appears on the hardware list of FreeBSD.

What I would LIKE to do is:
1). Set my 10/100 nick as the dedicated outside/internet connection with a lan ip of 192.168.1.100
2). Set the gig nick as the dedicated inside/lan connection with a lan ip of, eh, 192.168.1.(different number).

This is my home file server, and the gig nic I think would be better served for the lan then outside connections. Other then weekly remote backupus from a buisness machine, there is no trafic coming in to this box from the outside world.

This is what I think I should do:
BSD Guides :: Doing Stuff With FreeBSD, NetBSD, OpenBSD, & Mac OS X

In other words, set an alias entry into my rc.conf for one of the nics.

But, here is where my questions are.
1). Which nick should be the primary? (internal lan or external internet). My guess is the primary address should be the internet nick.
2). Will both ip's/connections appear in my router? So that I can shut down all internet trafic to the one nic?
**** I'll be doing firewall rules here also.


I know, stupid questions...

Any and all help is greatly appriceated.

drool
# 2  
Old 12-29-2008
Yeah, pretty basic questions. As for (1), sometimes you have dependencies that require an outside connection for things to work right, such as DNS lookups. For instance, your other servers might have DNS-addressable IP addresses and for your computer to boot, you need a service from one of those servers. Therefore, you either hardcode the IP/host entry in /etc/hosts, OR you set the NIC to boot up with the external interface fully configured. Other than that, which NIC is "primary" really doesn't matter.

Both IPs will not appear in your router. Only the external IP will. In fact, unless you set up your file server ALSO as a router, there's no need to do any special routing. Your internal addresses will be identified because of their subnet and IP range, and all other traffic will go through the "default" route, which will be on the same subnet as your external IP address.
# 3  
Old 12-30-2008
Another take on this might be if you want the secondary nic and lan to be serviced through your bsd server. You might for example want to give the second nic an address within a different subnet (such as 192.168.2.xxx if your netmask is a class C --- 255.255.255.0 or just choose another address/mask combination such as 69.69.69.1/255.255.255.0). You would need to enable routing of this second nic to the outside world. Your clients on this new subnet would have default route set to be your bsd server. All of this also would assume you run a separate physical wire for the second nic to keep the traffic separate. There are also other benefits here if you want to for example to have your bsd server act as the dhcpd server for this secondary lan. Lastly, I am not sure about bsd but LINUX does offer the ability to masquerade so that you could have your bsd server act as the single access point to the outside world. Why do all of this? It does give you the ability to control traffic between your client workstations and the outside world if that is you end goal. The implication/downside is that your bsd server would need to kept online to service the secondary lan clients. Lots of options/fun to play with.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux with two NICs

Hello All, I have Linux box with two interface cards. Every card has it's own IP Address and Gateway, IP addresses are from different subnets. eth0 192.168.1.10/24 GW 192.168.1.1 eth1 192.168.2.10/24 GW 192.168.2.1 Third PC is located in 192.168.13.0/24 network and is trying to access... (2 Replies)
Discussion started by: AndreiM
2 Replies

2. IP Networking

Networking 2 NICs

Hi all, Host - Ubuntu 12.04 desktop 64bit Virtualizer - Oracle VirtualBox 2 NICs Where can I find relevant document to set up 2 NICs, one for inward bound and another for outward bound, separate channel, both connected to the same router Would following document be appropriate for my... (1 Reply)
Discussion started by: satimis
1 Replies

3. Solaris

Redirect to same port two NICs?

Dear members, I have to problems ; First ; I need to setup two NICs for a Solaris 10 server. But I could not do that unless giving different names in /etc/hosts file. like : 10.1.1.1 testsolaris1 10.3.1.1 testsolaris2 Second ; After solving first problem I have to setup my... (3 Replies)
Discussion started by: shadowfaxxxx
3 Replies

4. UNIX for Dummies Questions & Answers

How to find about NICs installed

Hi; Is there a way to determine for sure how many NIC ports installed on my Linux box? I tried to run "lspci" but not sure about the results, it's not clear. Below are the results when i run both "ifconfig" & "lspci" on my Linux box i hope someone can help me finding the actual numbers of... (1 Reply)
Discussion started by: Katkota
1 Replies

5. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

6. Linux

Two NICs one IP address

I'm looking for a way in RHL 5.1 to use two NICs on one host with two physical IP addresses and map them under one virtual IP address, i.e. NIC 1 10.10.10.1 NIC2 10.10.10.2 VIP 192.168.10.1 Basically I want either one of the NICs to ARP for the VIP. No load balancing required just HA. (2 Replies)
Discussion started by: wschmied
2 Replies

7. Solaris

How many NICS do I have?

Hi, is there a way in Solaris 8 to determine how many total NIC's say a Sun Sparc box has installed - plumbed or unplumbed - and find out its capable network speeds and MAC address? I know ifconfig -a but that only shows the plumbed and used interfaces. thx cc (2 Replies)
Discussion started by: bigapple100
2 Replies

8. IP Networking

FreeBSD and two NICs

FreeBSD 4.8, Apache 1.3.27 - two NICs, one with a real-world IP plugged into a switch outside the PIX firewall, the other with a private IP plugged into a switch inside the PIX firewall. Apache listens on both IPs. my domain is mydomain.org. so in /etc/rc.conf i have something like this (these... (10 Replies)
Discussion started by: ednix
10 Replies

9. AIX

Merge NICs

Hi friends, I installed oracle 10g (10.2.0.2) RAC on 2 IBM p5 570 servers running AIX 5.3ML04 and HACMP5.2 (used Raw devices, not used GPFS). Each server has 4 x 1Gbps ethernet cards (NICs), en0 and en1 for boot address, en2 and en3 for oracle interconnect. Now i want to merge 2 NICs (en2 and... (1 Reply)
Discussion started by: bong02
1 Replies

10. IP Networking

HELP!! NICs went offline suddenly

I have a new server... We were doing some testing on it over the local ethernet. All was well in the night when we turned off the machine. In the morning we were unable to get the server online. Have changed cables, NICs, looked over network settings... all to no avail. I am running Redhat... (4 Replies)
Discussion started by: skotapal
4 Replies
Login or Register to Ask a Question