Linksys wireless and ONE static machine?

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Linksys wireless and ONE static machine?

Post by alex.barylski »

I have a single machine in my basement which I use for development and it does nothing more than act as a server for everyone in house, myself included.

I would like to assign it a static IP but restrict that static assignment only to that machine, so other wireless devices that get added to the network get picked up right away, assigned a dynamic IP and are good to go (wireless network is encrypted so people need to authenticate).

Ideally though, I would like the single server in the basement to be statically assigned an IP so I do not have to keep updating my SSH, hosts, etc on my Windows machines that I use for development.

Is this possible? What do I modify and how?

Code: Select all

/etc/networking/interfaces
I think is the file of interest under Debian...but do I need to configure my router via 192.168.1.1???

Can someone explain the steps? Sounds like I must configure my router to start DHCP IP's at 192.168.1.2 and upwards...using 192.168.1.1 for my server? How does the router know the IP address 192.168.1.1 is going ot be used for a server though?

I don't want to enable port forwarding, as I don't want access to my server from the outside (just yet anyways).

Cheers,
Alex
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Linksys wireless and ONE static machine?

Post by alex.barylski »

OK I am looking at my router config...seems DHCP starts at 192.168.1.100 and allows for a max number of DHCP users.

So do I change this value to 192.168.1.101 and use 192.168.1.100 as my static IP for the Debian server?

I would then configure the debian server /etc/networking/interfaces to use 192.168.1.100 as a static IP?

I'm still confused though, as to how the router knows to send requests for that IP to a static IP and now a DHCP -- without resorting to port forwarding???

EDIT | Once I have saved these changes do I need to reboot the router and computers connected to it, so they all get new assignments?

Cheers,
Alex
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Linksys wireless and ONE static machine?

Post by Doug G »

I don't know about your particular model linksys but many dhcp servers allow you to reserve a specific LAN IP by MAC address. In effect the DHCP server will provide the specified computer with a static ip.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Linksys wireless and ONE static machine?

Post by VladSun »

Doug G ++ :)
There are 10 types of people in this world, those who understand binary and those who don't
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Linksys wireless and ONE static machine?

Post by alex.barylski »

VladSun: So in my router config I can indicate that a static IP should be used for computer with a MAC address that matches my server. Do I still change any settings in /etc/network/interfaces???

I read some more as I understand, the computer when booting would tell the router which IP it wanted to use, so long as it wasn't with in the range of dynamic IP's???
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Linksys wireless and ONE static machine?

Post by VladSun »

With MAC/IP pairing it's pure DHCP used again, but the IP you have 'reserved' is no longer available in the DHCP pool - it's only available for DHCP request with the specified MAC source address.
So, you don't need to make any changes to any of your workstations.

In my router DHCP MAC/IP pairing could be found in
IP Config -> DHCP Server -> Assign IP Address Manually
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Benjamin
Site Administrator
Posts: 6911
Joined: Sun May 19, 2002 10:24 pm

Re: Linksys wireless and ONE static machine?

Post by Benjamin »

I've also noticed that if you assigned a static IP to a box with a router configured for DHCP, the router will give that box the requested IP if it's not already in use.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Linksys wireless and ONE static machine?

Post by alex.barylski »

Still not sure what to do or change...here is a screenshot of my router config panel:

I can select "static IP" from the automatic configuration drop down but I'm afraid once I do that all IP's will be sttaic not just the one machine....and of course I cannot find any docs for my router. :P

EDIT | I have googled the linksys web site and searched their knowledgebase and found nothing about assigning a single computer a static IP...seems my best bet would be to increment the starting IP address by one (192.168.1.101) and setup my debian computer to use 192.168.1.100 in /etc/network/interfaces???
Attachments
screen1.PNG
screen1.PNG (53.45 KiB) Viewed 5500 times
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Linksys wireless and ONE static machine?

Post by alex.barylski »

So I did as I stated above...added the appropriate config to /etc/network/interfaces and bumped the IP DHCP by one and use that addy for the static IP...voila everything seems to work...and I've gained valuable experience in Linux networking...:)
Post Reply