LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Fixed IP on my work laptop :-( (https://www.linuxquestions.org/questions/linux-networking-3/fixed-ip-on-my-work-laptop-484567/)

Paulsuk 09-18-2006 04:30 AM

Fixed IP on my work laptop :-(
 
Hi,

I have a wireless LAN at home using the 192.168.x.x private address range. My Linux box is providing storage, print and internet access as well as DHCP, DNS e-mail etc.

So far so good, except I have been given a laptop from work which is locked down with a fixed IP address on the wireless card. I'd like to use it wireless at home (I have to plug it in at the moment!) so...

How do I add a second IP to my Linux box and get it to provide all the same services (except, naturally, DHCP) on the second network number? I can use the same address as the default gateway at work (or the DNS server, although I would like to put both addresses on the interface).

Many thanks,

Paul

zamri 09-18-2006 05:03 AM

This can be achieved with a profile management but I never done this. Maybe others may help.

InkyGhost 09-18-2006 11:53 PM

Haha, I cheated and beat the same problem.
 
My work laptop is also locked down with afixed IP address to the wireless card. I cheated and bought a cheap 802.11b router for $13 from geeks.com and hooked it to a port on my box.

I assigned the router a fixed WAN ip address to fit my server range and defined that port on the server to be a DMZ port. Then I just made the router address my laptop direclty with MAC addressing and the problem was solved in less the 10 minutes.

I know I didn't learn anything new about my server that way, but at least I was able to get my laptop up and running wireless quickly. I just felt my time was worth more in this case than the $13 I spent on the cheaters way out. Besides, I didn't really want to screw up the server a friend of mine set up for me until I get a better handle on this Samba stuff I'm playing with.

InkyGhost

Paulsuk 09-19-2006 02:12 AM

An interesting solution that I may well have to try.... I only really have two problems (sorry to be negative!) with that method:
  1. I already have a wireless network set up for other machines at home, so I'd have to duplicate it all and make sure the laptop connects to the correct one (doable, but a pain!)
  2. DNS. The fixed address assigned by work is an internal DNS server, so won't work with my DNS at home. So I will still need to put a second address onto the box and tell it to serve DNS on that address. Unless, of course, I can get the router to do reverse NAT on the port, but that is getting both complicated and, I suspect, expensive!

BTW, someone, elsewhere, suggested changing the address range I use at home to match work. I could do this, but it would involve an awful lot of configuration and also may cause problems as work is using a public address space (privately, can you believe!) Also, like you, I don't want to risk breaking SAMBA etc (which took AGES to get working right - particularly printing!) with the knock-on implications for my marriage!!!!

Thanks,

Paul

Hangdog42 09-19-2006 07:10 AM

If you have root privileges on your work computer you could assign a new IP address and gateway with ifconfig and route. The DNS is going to be a bit trickier, but I think you could add your ISP's nameservers to /etc/resolv.conf and leave the work DNS in there as well. That is probably going to cause a lag when you surf, but I'm not sure there is a way around that without removing your work DNS entry.

Paulsuk 09-19-2006 01:23 PM

Thanks Hangodog, but unfortunately, Linux doesn't become involved on the laptop, only the server. The laptop is M$ Windoze!

I cannot alter the config of the laptop at all. It doesn't use DHCP for a very good reason, which I can accept.

All I need is for the Linux box to appear, to the laptop, to be the same as the work network.

david_ross 09-19-2006 01:55 PM

You could just add an alias to your linux box on the network card - ie:
ifconfig eth0:1 192.168.100.1 netmask 255.255.255.0


All times are GMT -5. The time now is 12:46 AM.