开发者

configure linux box to have a static ip [closed]

开发者 https://www.devze.com 2023-01-07 01:58 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 开发者_JAVA技巧12 years ago.

Improve this question

I need to make a machine on my home network use a static ip address. It's a linux box.

My question is can I make just my linux box use a static ip address where the rest of my network (which is comprised of all windows machines linked up to a router) uses dynampic ip's?

It not so much the info on configuring the linux box to use a static ip it's just i'm confused - does my whole network have to use a static ip if I want to use a static ip on one box?

Many thanks


your router is probably running a dhcp server, so you should set your linux box to an ip which is not covered by the dhcp range of your router.

See man interfaces for information about how to set the static ip for your debian.

Regards


Yes you can make your PC use a static ip while the rest of the network remains on DHCP

I'm Running Ubuntu Lucid (10.04)

2 options

  1. System->Preferences->NetworkConnection then editing the eth0 setting ipv4 to manual and set appropriate settings.
  2. manually edit the /etc/network/interfaces file, I added the following

auto eth0

iface eth0 inet static

address 192.168.0.7

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.1


Most of the routers have option to assign static ip to a mac addres. Let you Linux box on dhcp. Log on to router setting page. There should be a setting page to assign static ip to a given MAC address. This is available on Linksys router. If your doesn't support than see if you can flash your router with dd-wrt/open-wrt/tomato. these firmware definatly support this feature.

If you still want to configure you Linux client and not the router than i suggest you pick the highest fourth quad number. Router will not use that ip unless you have so many box on the network.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号