Networking 201 - two NICs on the same PC

Networking, connecting to the internet, wi-fi and home entertainment
User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Networking 201 - two NICs on the same PC

Post by John Gray »

I have a 4-port router and am running out of ports, so have decided to enable a second NIC (card) in my main PC to connect to my NAS box, which currently connects direct to the router.

So I am disconnecting the patch cable from the router, to plug it into a crossover plug which in turn is plugged into the second ethernet card on the PC.

The router (at 192.168.a.1, see below) gives out IP addresses using DHCP on the main subnet, to the PC and other connected devices, so I assume that:
a) I have to use a second subnet for the second NIC/NAS combination
b) I can't use the router to give out dynamic IP addresses via DHCP on a second subnet
c) therefore I will have to choose fixed IP addresses for the second NIC card and the NAS box.

If that's the case, and the first subnet is 192.168.a (subnet mask 255.255.255.0)
then is there anything wrong with the following (where b is my second subnet)?

On the second NIC
IP address: 192.168.b.1
Subnet mask: 255.255.255.0
Default gateway: 192.168.b.1 (do I need to specify this?)
DNS Server address: 192.168.a.1 (the router's IP address)

on the NAS box
IP address: 192.168.b.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.b.1 (do I need to specify this?)

It's a bit messy to try since the NAS box takes a couple of minutes to power up, and it's a bit of a pig to change its IP address from the a subnet...

Thanks for answering what must be an easy question to those who have done this sort of thing before!
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Networking 201 - two NICs on the same PC

Post by StuartR »

That looks as though it should be OK.

You shouldn't configure a default gateway on the 192.168.b.0/24 network, since you don't want any packets sent there - except if they are destined for that network.
StuartR


User avatar
mwolfman
The Man, The Myth, The Legend
Posts: 770
Joined: 16 Jan 2010, 00:14
Location: New Jersey

Re: Networking 201 - two NICs on the same PC

Post by mwolfman »

Just a quick thought - why don't you get a small 8 port switch to connect to the router?
Mike Wolfman

--To err is human; to really screw up requires root

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Networking 201 - two NICs on the same PC

Post by John Gray »

Because I don't want to reduce the bandwidth, perhaps? I already had the second NIC (but had forgotten I had installed it a couple of years' back). Stuart's reassurance got me going, and my NAS continues to work fine. I had a whole bunch of Belkin 5-port switches at work, and was pleased to get rid of them!
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...