Page 5 of 5 FirstFirst ... 345
Results 41 to 44 of 44

Thread: new nic has no ip 12.04

  1. #41
    Join Date
    Mar 2009
    Beans
    5

    Re: new nic has no ip 12.04

    Hello,

    I'm struggling with kind of same issue here.
    I have Ubuntu server 10.04 2 network cards in it.
    eth0 is LAN side and has fixed ip, eth1 will be having a dynamic ip from the isp provider when they come next week.
    Now i was already testing the eth1 card to put it also in the same LAN side to obtain an IP from the dhcp server running on the server, can this work for only testing?
    Because when i restart the interfaces eth1 does not get an IP
    And I'm worried and thinking that this NIC isn't working properly but the output with ifconfig -a gives me all kind of information about eth1
    I also have ipv4forward enabled and later on when the actual isp line is there i will also activate the NAT in iptables.
    But first I'd like to know if I can test eth1 to get an ip from the dhcp server on eth0 ?
    If I give eth1 a static IP in the range of the LAN I can ping to it. but why does it not get a dhcp IP ?
    I also have tried a new NIC but it gives me the same result

    Even after connecting a router to this nic and did a restart it gave me this same result :
    /etc/init.d/networking restart
    * Reconfiguring network interfaces... There is already a pid file /var/run/dhclient.eth2.pid with pid 7936
    killed old client process, removed PID file
    Internet Systems Consortium DHCP Client V3.1.3
    Copyright 2004-2009 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/

    Listening on LPF/eth2/00:0e:2e:37:20:83
    Sending on LPF/eth2/00:0e:2e:37:20:83
    Sending on Socket/fallback
    ssh stop/waiting
    ssh start/running, process 10443
    Internet Systems Consortium DHCP Client V3.1.3
    Copyright 2004-2009 Internet Systems Consortium.
    All rights reserved.
    For info, please visit https://www.isc.org/software/dhcp/

    Listening on LPF/eth2/00:0e:2e:37:20:83
    Sending on LPF/eth2/00:0e:2e:37:20:83
    Sending on Socket/fallback
    DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 4
    DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 4
    DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 10
    DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 12
    DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 17
    DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 14
    Last edited by rytec; October 9th, 2012 at 11:11 PM. Reason: extra test, test2

  2. #42
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: new nic has no ip 12.04

    Quote Originally Posted by darkod View Post
    There is nothing to screw up. If you changed your mind and you want eth1 to be your LAN internal interface, configure it with something like:
    Code:
    # Internal LAN interface
    auto eth1
    iface eth1 inet static
       address 10.10.0.1
       netmask 255.255.255.0
    Then on the laptop go into Network and in the properties of your wired connection set:
    IP 10.10.0.100
    Subnet 255.255.255.0
    Gateway 10.10.0.1
    DNS 8.8.8.8 (Google DNS for example)

    Then open command prompt on the laptop and try:
    ping 10.10.0.1

    That should return the ping from your server. If all of that works out, you're good to go.

    At that moment the laptop will still not have full internet access.

    On the server open /etc/sysctl.conf to edit with:
    sudo nano /etc/sysctl.conf

    Uncomment (remove the # from the start of) the line saying net.ipv4.ip_forward=1

    Save the changes with Ctrl + O and exit nano with Ctrl + X.

    Then on the server do:
    sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    Now test if your laptop has internet access through the server. It should.

    If that works, the only thing left is to make the iptables command permanent because executing it like that in command line will only set it up temporary. After a reboot it won't work.
    But first do this test and making it permanent is easy.
    This worked for me when I did EXACTLY as advised. Of course noting that your nics have different numbers. Server is in place and functioning.

  3. #43
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: new nic has no ip 12.04

    Just to review: I am running 12.04 server with GUI. WAN is to ADSL modem/router and eth0 (WAN) is set for DHCP. Gateway is 192.168.1.1. ETH1 (LAN) is 10.10.0.1 and LAN range is 10.10.0.10;10.10.0.150 mask 255.255.255.0. ETH1 is static and dealing DHCP to clients. I tried using 192.168.1.whatever on the LAN side and this just doesn't work.
    One issue was the onboard ehternet was running realtec r8169 for driver which is in the kernel, but the added nic (ETH1) is not a 10/100 card. All the 10/100/1000 cards which use realtec drivers require r8168. R8168 will also run the 10/100 devices. I downloaded current r8168, removed r8169, and installed r8168.

  4. #44
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: new nic has no ip 12.04

    One thing after another, update. Darkod, thanks for the patient help. I since changed to 10.04 which I kept pretty lean . It's so much easier to fix things when things are more available to change. UFW..out, dhcp3..out, bind9..out, dnsmasq..in. Firewall supplied by enterprise router with QOS. Considering posting a "simple router behind adsl" thread..Marking this solved.

Page 5 of 5 FirstFirst ... 345

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •