Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 44

Thread: new nic has no ip 12.04

  1. #11
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,558
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: new nic has no ip 12.04

    Quote Originally Posted by hawaiiman View Post
    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.
    You can't use the laptop as an example of a LAN unless a dhcp server is running on it. Is it?

    When you simply connect the test server to the laptop, nothing will happen. Especially if you connect them directly with a cable, not using a hub or switch. For direct cable connection you would need cross-over cable, and most network cables are not. Teh yare standard straight-through cables and need to be used with a switch/hub.

    But in any case, your test can't work without dhcp server running on the laptop.

    So, at the end, will this server be a dhcp server for the LAN or that will be the 192.168.1.3 server? Because if this server is not supposed to be dhcp for the LAN, you don't actually need two interfaces. In that case the server will be just like any computer on the LAN, it can have its static IP, but will be receiving internet from the same router like all the other computers. That means only one interface is needed.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

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

    yes, I see your point, but you seem to have my plan turned around 180. The dhcp in this case comes from the WAN side, from an internet connected router (via adsl). The laptop connected to eth0 will in this case become a client of the server and obtain nat from it.Of course in this case it would be double nat, but at this point that's not a problem (?). the server has this 198... ip because it is a client of the router. I can't disable nat on the router, as it's firmware is locked out of most settings by the isp. I can't do much else as the phone line from adsl has the small plug and my spare router has an rj45. I took the server to school today and connected it to the LAN there. It was connected to a switch (level 2) and the hp-ml-350 server (level 3) to WAN (fiber). The situation with eth 0 stayed exactly the same. The problem , here is that I don't know all the places to enter information, and what to enter, like in /etc/network/interfaces. I know ther are libs and at least a conf or two to be dealt with here. I just don't know what to do.

  3. #13
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,558
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: new nic has no ip 12.04

    The settings are only in /etc/network/interfaces.

    So, you have eth0 configured for dhcp and it didn't receive an IP from the LAN at work? I assume there is a dhcp server running on the LAN at work.

    I don't understand 100% what do you want to test. On this server, if eth1 connects to the WAN and the eth0 to the LAN to act as server for the computers on the LAN, then eth0 should have private static IP in a range that you decide. The IP depends only on your choice what range you want to use in your LAN.

    For example, like 10.10.0.1. Then it should have dhcp server running on this server if the computers on the LAN expect to be issued addresses by this server.

    If you can do some sort of diagram what do you want to achieve, it might help.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

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

    All I am trying to do is have a test bed for this new server. I realize that in it'sfinalfom, it will have a stqtic IP. Perhaps I'm wrong, but I don't believe if I give it it's static IP now, underneath a dhcp router and connected to a different isp that it will be able to see the internet.
    I'm trying to get this machine set up so it has it's most basic functions at home, thentake it to school, unhook the other server, give it it's static ip, configure it with subnet, etc. and be done with it. It would be quite inconvenient for the clients at school to have the system offline while i play around with it. Diagram is not needed . At home: ADSL->router/switch->server->client. Then ..At school: Fiber->fiber to ethernet converter->server->switch->client.
    As I said earlier, the same result when connected through the school system replacing client position. Internet access ok, no link on eth0.

  5. #15
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,558
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: new nic has no ip 12.04

    1. Make sure you have the
    auto eth0
    in /etc/network/interfaces. That tells the OS to activate the interface at boot. Without it it won't activate regardless of other settings.

    2. To double check if eth0 is working fine, configure it with dhcp (same like eth1 temporarily) and connect it to your router at home. Can it receive an IP?

    3. If that works fine, configure eth0 with private static IP that you plan to use in the LAN at school (but not in the same range as your home router range), for example 10.10.0.1, mask 255.255.255.0. Configure your laptop with static IP 10.10.0.100, mask 255.255.255.0, gateway 10.10.0.1.

    Then try a ping to 10.10.0.1 from your laptop. It should work. Note that internet might not work until you enable ipv4 forward in /etc/sysctl.conf because only then the server will start forwarding packets between eth1 and eth0. You will also need few settings in iptables if you want the server to act as router, but all that can be done later after the networking works as you expect it, with successful ping, etc.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

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

    1. I worried that having eth1 be wan and eth0 be lan so I changed the content in .../interfaces to read as follows:

    # The primary internet interface
    auto eth0 iface eth0 inet dhcp


    # The primary network interface
    auto eth1
    iface eth1 inet dhcp

    2.yes and it also sees the default "it works" at the 198.162.1.3 where the website will be.
    192.168.1.3 255.255.255.0

    3. since i've screwed this up before, please walk me though this step by step. --thanks

  7. #17
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,558
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: new nic has no ip 12.04

    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.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

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

    sorry about the delay.I hope I haven't inconvenienced you. got very uncomfortable,soI'm going to shut down and move everything soI can sit on the sofa.Thanks again. I'llsend an update

  9. #19
    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 wasn't sure if the static ip etc. you recommended here s/b for lan or wan side. i set for wan side of server and left lan side at auto and dhcp.when i pinged 10.10.0.100 i get error /bin/ping ping -b -c 5 -n 10.10.0.100

  10. #20
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,558
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: new nic has no ip 12.04

    Quote Originally Posted by hawaiiman View Post
    I wasn't sure if the static ip etc. you recommended here s/b for lan or wan side. i set for wan side of server and left lan side at auto and dhcp.when i pinged 10.10.0.100 i get error /bin/ping ping -b -c 5 -n 10.10.0.100
    That was for LAN side. That's why I left the comment # Internal LAN interface.

    For the WAN side you will either use dhcp or static IP depending on your provider router/connection.

    Also I said to set the 10.10.0.100 on your laptop and try to ping your server at 10.10.0.1.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

Page 2 of 5 FirstFirst 1234 ... 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
  •