Page 1 of 5 123 ... LastLast
Results 1 to 10 of 44

Thread: new nic has no ip 12.04

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

    new nic has no ip 12.04

    Hello, Noob took on building a new server. Started with 11.10 server and upgraded to 12.04. I need a second ethx (server...) . All I could get here in N.E. Thailand is a TP-Link tg-3468 which uses the Realtek 8111c chipset. My onboard device uses the Realtek 8111b chipset. Got the autorun.sh to run, so the original r8169 driver is out and both are running the r8168. The onboard works fine. For some reason it's shown as eth1 and the nic as eth0. The link shows up for the eth0 in ifconfig, and plugged in to my laptop, they exchange a few packets. Laptop sees "unknown network no network access" . Eth0 is not getting an IP# . Pretty sure I need to edit some files around, like adding eth0 to /etc/network interfaces, but don't know what they all might be, or what to enter.
    The cd that came with the card has information for doing all that, but Debian commands aren't listed.
    <Set the network related information>
    1. Set manually
    a. Set the IP address of your machine.

    # ifconfig ethX "the IP address of your machine"

    b. Set the IP address of DNS.

    Insert the following configuration in /etc/resolv.conf.

    nameserver "the IP address of DNS"

    c. Set the IP address of gateway.

    # route add default gw "the IP address of gateway"

    2. Set by doing configurations in /etc/sysconfig/network-scripts
    /ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network
    /ifcfg-ethX for SuSE. There are two examples to set network
    configurations.

    a. Fixed IP address:
    DEVICE=eth0
    BOOTPROTO=static
    ONBOOT=yes
    TYPE=ethernet
    NETMASK=255.255.255.0
    IPADDR=192.168.1.1
    GATEWAY=192.168.1.254
    BROADCAST=192.168.1.255

    b. DHCP:
    DEVICE=eth0
    BOOTPROTO=dhcp
    ONBOOT=yes

    <Modify the MAC address>
    There are two ways to modify the MAC address of the NIC.
    1. Use ifconfig:

    # ifconfig ethX hw ether YY:YY:YY:YY:YY:YY

    ,where X is the device number assigned by Linux kernel, and
    YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

    2. Use ip:

    # ip link set ethX address YY:YY:YY:YY:YY:YY

    ,where X is the device number assigned by Linux kernel, and
    YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

    <Force Link Status>

    1. Force the link status when insert the driver.

    If the user is in the path ~/r8168, the link status can be forced
    to one of the 5 modes as following command.

    # insmod ./src/r8168.ko speed=SPEED_MODE duplex=DUPLEX_MODE autoneg=NWAY_OPTION

    ,where
    SPEED_MODE = 1000 for 1000Mbps
    = 100 for 100Mbps
    = 10 for 10Mbps
    DUPLEX_MODE = 0 for half-duplex
    = 1 for full-duplex
    NWAY_OPTION = 0 for auto-negotiation off (true force)
    = 1 for auto-negotiation on (nway force)
    For example:

    # insmod ./src/r8168.ko speed=100 duplex=0 autoneg=1

    will force PHY to operate in 100Mpbs Half-duplex(nway force).

    2. Force the link status by using ethtool.
    a. Insert the driver first.
    b. Make sure that ethtool exists in /sbin.
    c. Force the link status as the following command.

    # ethtool -s ethX speed SPEED_MODE duplex DUPLEX_MODE autoneg NWAY_OPTION

    ,where
    SPEED_MODE = 1000 for 1000Mbps
    = 100 for 100Mbps
    = 10 for 10Mbps
    DUPLEX_MODE = half for half-duplex
    = full for full-duplex
    NWAY_OPTION = off for auto-negotiation off (true force)
    = on for auto-negotiation on (nway force)

    For example:

    # ethtool -s eth0 speed 100 duplex full autoneg on

    will force PHY to operate in 100Mpbs Full-duplex(nway force).

    <Jumbo Frame>
    Transmitting Jumbo Frames, whose packet size is bigger than 1500 bytes, please change mtu by the following command.

    # ifconfig ethX mtu MTU

    , where X=0,1,2,..., and MTU is configured by user.

    RTL8168B/8111B supports Jumbo Frame size up to 4 kBytes.
    RTL8168C/8111C and RTL8168CP/8111CP support Jumbo Frame size up to 6 kBytes.
    RTL8168D/8111D supports Jumbo Frame size up to 9 kBytes.
    Any help appreciated, and my students will be grateful too!

  2. #2
    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

    BTW to clarify: WAN is running fine with internet access obtained from a LAN port of an ADSL connected wifi router. Just setting it up at home and will put it on the fiber modem with static IP later when working. Not sure if having eth0 the LAN and eth1 the WAN is a problem.

  3. #3
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,786
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: new nic has no ip 12.04

    And what are you trying to set, static IP I guess?

    Edit /etc/network/interfaces (with sudo permissions because it's a system file), and the entry for the new eth0 should be like:

    auto eth0
    iface eth0 inet static
    address x.x.x.x
    netmask x.x.x.x
    gateway x.x.x.x (if using one)
    dns-nameservers x.x.x.x y.y.y.y (if using one)

    If the server is accessing the internet through eth1, then on eth0 you would need only address and netmask, that's enough to work in a private LAN.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 7 Ultimate 64bit

  4. #4
    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

    I just put the machine together and installed 11.10 server, then upgraded to 12.04 with unity.
    I have it at home now running behind a wifi router which deals dhcp. The connection is adsl. ight now, I'd be very happy to see eth0 get an IP from dhcp.I have the cable plugged in to my laptop as an example LAN.
    The server will be installed at my high school. We have many clients running wxp, a website, email serve. The school has fiber and a static IP#. I'll to to add your settings to /interfaces. What other places do I need to have settings?

  5. #5
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,786
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: new nic has no ip 12.04

    If it's the server OS, nowhere. Is it server with GUI installed, or desktop OS with added server roles?

    For dhcp it's even easier. It should be:
    Code:
    auto eth0
    iface eth0 inet dhcp
    But in order to receive dhcp IP from your home router, you have to connect it to the correct eth0 interface, right?
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 7 Ultimate 64bit

  6. #6
    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

    since it was server 11.10 with gui added, then upgraded to12.04, I believe it has theupgraded server packages. I am working from terminal out of the gui.
    have root now.
    i saved the dhcp linesyou just sent but no ip and laptop won't connect

  7. #7
    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

    For some eason the eth1 is the WAN getting internet and dhcp from the router. This is an onboard with realtek 8111b chipset.I have removed the r8169 driver, and installed the r8168, it's working fine. The eth0 is intended as the LAN. It's a tp-link with the realtek 8111c chipset, and the r8168 drive is the recommended driver for it.
    Its after midnight here in Thailand. I'll check for your post in the morning. Thank you very much.

  8. #8
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,786
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: new nic has no ip 12.04

    I don't understand completely your setup.
    The eth1 is the WAN connected to the router and receiving dhcp address correctly.

    How do you plan to use eth0? Is it supposed to be a gateway for the rest of the private LAN? So that the internet for the computers on the LAN passes through this server?

    The cable you connect to eth0, is it in a network with dhcp server? Otherwise, where would eth0 get a dhcp address from?
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 7 Ultimate 64bit

  9. #9
    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

    Right now the server is at my home, but when running, I will take it to the school where I teach.
    1-yes
    2yes it will be the dhcp server for an LAN with 30+ clients which run wxp. So, although right now its getting dhcp from the WAN, it'spurpose is to be the dhcp server and have a static ip and access the internet through fiber modem.
    It will also be email host, host our website,and serve database.
    3 the cat5 connected between eth0 and my laptop is to use the laptop as an example of LAN, as a test bed.

  10. #10
    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

    correction to 2 above. It is supposed to be getting dhcp from 192.168.1.3 (the server) but as yet is not

Page 1 of 5 123 ... LastLast

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
  •