Share internet connection/make a small server

Jeff Vian jvian10 at charter.net
Mon Aug 29 03:05:57 UTC 2005


On Sun, 2005-08-28 at 17:51 -0700, Antonio Olivares wrote:
> Dear folks,
>    Recently at work, the network administrators
> changed from static ip's to dhcp.  They made changes
> to use static dhcp using the mac address of the
> machines connected to the network.  Before I could
> connect to the network using something like
> 
> [root at rio ~]# ifconfig eth0 10.154.20.157 netmask
> 255.255.248.0
> [root at rio ~]# route add default gateway 10.154.16.1
> [root at rio ~]# echo nameserver 10.128.0.4 >>
> /etc/resolv.conf
> 
> Here's the info of that machine's connection after
> system administrator connected the machine using mac
> address.
> 
> [root at rio ~]# ifconfig -a
> eth0      Link encap:Ethernet  HWaddr
> 00:50:2C:A6:19:28
>          inet addr:10.154.19.136  Bcast:10.154.19.255
>  Mask:255.255.255.0
>          inet6 addr: fe80::250:2cff:fea6:1928/64
> Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500
> Metric:1
>          RX packets:2511 errors:0 dropped:0
> overruns:0 frame:0
>          TX packets:1766 errors:0 dropped:0
> overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:1405141 (1.3 MiB)  TX bytes:307686
> (300.4 KiB)
>          Interrupt:11 Base address:0xae00
> 

> [root at rio ~]#
> 
> Now I cannot get network access.  Even with dhcp
> enabled.  The network identifies the mac address of
> the machine and assigns the same ip throughout.  
> 

Are you getting a gateway route added?
Are you getting a DNS server provided?

The gateway would need to be in the same (new) class C address space and
the static gateway entry would need to be removed.

> I want to add an extra NIC/LAN card to this machine
> call it eth1 and use the machine as a host for a small
> network so that I can use/share the internet access
> with other machines.  I ask for advice/help on this
> issue.  I have read the following
> 
> http://www.tldp.org/HOWTO/DHCP/index.html
> 
> and 
> 
> http://www.linux-mag.com/2000-04/networknirvana_01.html
> 

What are the contents of /etc/sysconfig/network-scripts/ifcfg-eth0
and /etc/sysconfig/network ?
That is where you enable the necessary settings for hostname, gateway,
etc when doing static IPs, and the settings are different to use dhcp.

> but I am not sure how to begin.  I have not placed the
> nic card yet on the machine but I will do so tomorrow.
>  The machine has Fedora Core 3 with an everything
> install.  What do I need to setup a mini dhcp server
> from this machine?
> 

Right now you are trying to set up a dhcp client so this machine has
access to the internet via eth0.  A dhcp server is also simple, but is
not a factor in the problem you are describing.

When you set up the dhcp server you will need to restrict it to
answering only on the appropriate interface and set the appropriate
address range.  You will also have a routing issue to handle.

Adding a second nic may have some surprises.  It may get the name eth0
and the existing one may become eth1, depending on the order devices are
probed.
> 
> Thanks in advance,
> 
> Antonio




More information about the fedora-list mailing list