Ubuntu configuration ETH nic, fixed IP address1, modify the configuration file/etc/network/interfaces [email protected]: ~# sudo gedit/etc/network/interfacesAdd the following: auto eth0 #设置自动启动eth0接口iface eth0 inet static #配置静态IP address 192.168. 11.88 #IP地址netmask 255.255.255.0 #子网掩码Gateway 192.168.11.1 #默认网关2. Modify DNS sudo gedit/etc/resolve.confnameserver 127.0.0.1 #记得加上nameserver 8.8.8.8 #当地dns服务器 (view local DNS with Ipconfig/all, first DNS is default, Total 2 DNS)Note: #后面的注释信息不要加进去.3. R
Often encountered in the command line to take the IP address, or write a script reference IP address, need to use the command to take out; The following method is adjusted according to the actual situationThe following command environment is the centos6.6 system;[[emailprotected]~]#ifconfigeth0eth0link encap:ethernethwaddr00:0c:29:2a:03:61 inetaddr:192.168.20.50bcast:192.168.20.255mask:255.255.255.0 inet6addr:fe80::20c:29ff:fe2a:361/64 scope:linkupbro
@Ubuntu Configuring and modifying IP addresses1. Modify the configuration file/etc/network/interfaces[email protected]: ~# sudo gedit/etc/network/interfacesAdd the following content:Auto eth0 #设置自动启动eth0接口iface eth0 inet static #配置静态IPaddress 192.168.11.88 #IP地址netmask 255.255.255.0 #子网掩码Gateway 192.168.11.1 #默认网关2. Modify DNSsudo gedit/etc/resolve.confnameserver 8.8.8.8 #当地dns服务器 (view local DNS with Ipconfig/all, first DNS is default, Total 2 DNS)Note: #后面的注释信息不要加进去.3. Restart the network for
stop[[email protected] ~]#/etc/init.d/network start[email protected] ~]#/etc/init.d/network restartNetwork card status query[email protected] ~]# service network statusconfigured Devices:Lo eth0currently active devices:Lo eth0Temporary configuration of network card information without rebooting. [email protected] ~]# ifconfig eth0 10.1.1.10 netmask 255.0.0.0View NIC interface information, list all interfaces by default[email protected] ~]# ifconfigeth0 Link encap:ethernet HWaddr 00:0c:29:13:5d:
The IP configuration of Linux is mainly divided into these partsIP configuration, routing configuration, network management toolsIP configurationView IP configuration informationIfconfig: View all active network interfacesIfconfig-a: View all active and inactive network interfacesIpconfig interface: View specified interface information[[emailprotected]~]#ifconfigeth0eth0link encap:ethernethwaddr00:0c:29:06:5b:59 inetaddr:192.168.16.208bcast:192.168.16.255mask:255.255.255.0 inet6addr:fe80::
Linux network card changed from eth0 to eth1, how to repair use WMware installed Linux, after the successful installation, the use of the network card is eth0, no eth1. But after a period of time, do not know why eth0 can not be used, the system has automatically generated a ETH1 network card, which can be used to see the ifconfig command. [[emailprotected] ~]$ ifconfigeth1 link encap:ethernet hwaddr 00:0c:29:a9:22:9d nbsp; inet addr:192.168.1.108 bcast:192.168.1.255 mask:255.255.255.0
= 255.255.255.0ipaddr=192.168.84.101gateway=192.168.84.2dns1=192.168.84.2ipv6init=noarpcheck=noMake sure that the following parameters are setOnboot=yesnm_controlled=yesBootproto=static5 Restart the Network service after saving to ensure normal activation.[Email protected]=192 ~]# service network restartshutting down interface eth0: [ OK ]shutting Loopback Interface: [ OK ]bringing up loopback interface: [ OK]
FreeBSD View IP Address command
Step 1th: Use SSH or local login successfully to the FreeBSD system.
Step 2nd: After successful login, execute "ifconfig-a" on the command line and enter OK.
The 3rd step: The following way to return a large number of letters and numbers, you can see in these letters and numbers you see the IP address, MAC address and other related information.
$ ifconfig-a
em0:flags=8843
options=9b
Ether 00:0C:29:E2:CE:A2
inet 192.168.1.195 netmask 0xffffff00 broadcast 19
combination that is often used. I'll have a description of this in the following blog, which I'll skip here. Only for the use of graphical traffic will be in the learning cacti, but also to nagios and cacti integration, the cost is too high. Is there a way to customize network traffic monitoring and display it graphically? This article is using the shell with the drawing tool gnuplot to display the network traffic graphically, you can embed him into nagios or simply use it alone.
First we need
About the configuration of the graphical interface, I do not introduce more here, this is very simple. Here is how to implement the virtual network card by modifying the configuration file.First introduce the configuration of the virtual network card under Ubuntu (I'm using ubuntu-16.04)1, first use ifconfig to view the current network card configurationENS33 Link ENCAP: Ethernet Hardware Address Geneva: 0c: in: C6:be:c7 inet6 Address: Fe80::20c:29ef:
Ifconfig,echo,tty,startx,export,pwd,history,shutdown,poweroff,reboot,hwclock,dateIfconfigFormat: ifconfig [network Devices] [parameters]Purpose: View and configure network devicesParameters-A view opened port information-S Display summary information (similar to netstat-i)-promisc sets whether the Promisc mode of the NIC is supported, and if this parameter is selected, the NIC will receive all packets sent to it in the network-allmulti Settings Support multicast mode, if you select this paramete
;MTU: Sets the maximum transmission unit.[[Email protected] ~]# IP link set eth0 up# start eth0 this device;[[Email protected] ~]# IP link set eth0 down# close eth0 this device;[[Email protected] ~]# IP link set eth0 MTU 1000# change the MTU to bytes, the unit is bytes.IP link set eth0 address Aa:aa:aa:aa:aa:aa[Email protected] ~]# ip-s link1:lo: Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00Rx:bytes packets Errors dropped overrun Mcast108016 473 0 0 0 0Tx:bytes packets errors dropped car
specify a subnet mask
D. Re-enter ifconfig will find that its network card address (IP address) has been set to 192.168.162.3 as follows, after naming the content:
[Root@localhost ~]# IfconfigEno16777736:flags=4163inet 192.168.162.3 netmask 255.255.255.0 broadcast 192.168.162.255Inet6 fe80::20c:29ff:fe9d:881d Prefixlen ScopeID 0x20Ether 00:0c:29:9d:88:1d Txqueuelen 1000 (Ethernet)RX packets 1380 Bytes 109783 (107.2 KiB)RX errors 0 dropped 0 overruns
=yes
Bootproto=static
netmask=255.255.255.0
ipaddr=192.168.84.101
gateway=192.168.84.2
DNS1= 192.168.84.2
ipv6init=no
arpcheck=noMake sure the following parameters are set
Onboot=yes
Nm_controlled=yes
Bootproto=static
5 Restart Network Service after saving to ensure normal operation.
[root@testateway=192 ~]# Service network restart
shutting down interface eth0: [ OK ]
shutting Down loopback interface: [ OK ]
bringing up loopback in
:0collisions:0 txqueuelen:0RX bytes:16565 (16.5 kb) TX bytes:16565 (16.5 kb) Then set the IP and subnet masks directly to Eth3.
root@bt:~# ifconfig eth3 10.10.10.128 netmask 255.255.255.0
Set success, and then look at the network card: root@bt:~# ifconfig-aEth3 Link encap:ethernet hwaddr 00:0c:29:ac:3c:2a//have, haha.inet addr:10.10.10.128 bcast:10.10.10.255 mask:255.255.255.0Inet6 ADDR:FE80::20C:29FF:FEAC:3C2A/64 Scope:linkUp broadcast RUNNING mu
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.