课程: Practical Linux for Network Engineers: Part 1

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Ubuntu Server: Manual IP address

Ubuntu Server: Manual IP address

- Now you probably don't want your Ubuntu server getting an IP address via DHEP. So cat/ctc/network/interfaces shows us that the server is getting IP addresses through DHEP. On our second Ubuntu docker container, cat/etc/network/interfaces shows us that this docker container is having its IP address configured statically. So we probably want to do something similar on the Ubuntu server. So on my Ubuntu server, sudo nano/etc/network/interfaces What I'm gonna do is comment out this line and add a new line with the interface, but set it to use static IP addresses. Address is gonna be 10.1.1.200 netmask is gonna be a slash 24 mask gateway is gonna be 10.1.1.1 My Cisco router and the DNS name servers are gonna be 8.8.8.8.8.4.4 which are Google DNS servers. I'm gonna press control X, and press Y to save my changes to etc network interfaces. So now etc network interfaces has that configuration, but ifconfig shows us that the current IP address is still 10.1.1.3 So I'm going to say sudo…

内容