network card wont get dhcp ip address from my ISP

Posted on 2005-04-22
Last Modified: 2012-05-05
my network card in my fedora 3 linux system wont get a dynamic ip from my isp when connected to a switch ?

ive got two routers connected to the switch which work fine and get ip's but the linux system doesnt want to get an ip when connected to the switch?

if i connect it to the modem directly then it will but not going through the switch?
anyone know if they experienced such issues?

ive got the ifcfg-eth1 setup with dhcp on boot

Question by:aot2002
    LVL 16

    Accepted Solution

    how many IP addresses is your ISP willing to give you?

    just to make sure I get it
    you have a modem from your isp connected to a switch, and then you've connected 2 routers into that switch - and they have been given dynamic addresses, and now you're plugging your pc into the same switch, but it's not getting an address
    LVL 9

    Assisted Solution

    The switch shouldn't be an issue if it's working properly.  To find out for sure,
    assign an IP manually (/sbin/ifconfig eth1 x.x.x.x broadcast y.y.y.y netmask z.z.z.z up)
        where:  x.x.x.x = Valid IP from your ISP's IP pool
                    y.y.y.y =  Broadcast addy
                    z.z.z.z = Netmask ( if you have a 32 IP block from your ISP for example)

    and set the gateway address (/sbin/route add default gw w.w.w.w) (obviously w.w.w.w is your gateway/router's address...prolly the 1st IP in your IP pool)

    then see if you can ping the gateway/router and access the internet.  If not, then there is some other connectivity problem (bad patch cable (replace), misconfigured switch port (if a managed switch), broken switch port (try another port), improper speed negotiation between switch and nic (try manually setting speed), etc) and isn't DHCP related.
    LVL 7

    Expert Comment

    Also make sure one of the routers isn't also acting as a DHCP server on your segment.  Try unplugging the routers from the switch, so that it's just the cable modem and Linux box plugged into the switch.  If that still doesn't work, but plugging the cable modem into the Linux box does, then it's either a problem with the cable modem, a bad cable / switch port, or some other local problem (or possibly an intermittent issue with the upstream provider).  Note that some cable modems will maintain a table (arp) of the devices connected to it, and get unhappy about trying to connect multiple devices directly to it or switching between multiple devices.
    LVL 1

    Author Comment

    >>how many IP addresses is your ISP willing to give you?

    I called them they said up to 6 computers and right now i have two routers taking up 2 spots so that leaves me with 4 left.
    yes you have the correct setup layout ...

    i will attempt the other tries tonight for you

    LVL 1

    Author Comment

    is there a command to restart a network service in linux?
    LVL 7

    Assisted Solution

    service or network?

    /etc/rc.d/init.d/network restart

    will restart network under RedHat o/s's.  other o/s's may place the init script in a slightly different place, or work better with "service network restart"
    LVL 1

    Author Comment

    thanks well it was a problem with my ISP only giving me two computer address's and they were susposed to allow up to 5 !

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now