In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
I. the significance of the network
Today, the Internet has become the most important resource in human development. When human beings are not fully prepared to meet the advent of the network era, it has become a content closely related to all actions in our lives. We can't leave the Internet, just like we can't live without food. Although people without the Internet era have existed for tens of thousands of years and created a variety of great civilizations and brilliant achievements, people's desire and wisdom always go hand in hand. Once desire promotes wisdom to be opened, it will become uncontrollable. There's no turning back.
With the development and growth of the network. Internet companies have increasing requirements for the security and reliability of the network. Network management has become a basic skill that we must be familiar with.
II. Network Management of Centos 6 (Ethernet)
The naming method of the centos 6 network interface: eth [0Jing 1Jue 2]. The network interface of centos 6 is identified according to the mac address, the first identified network card is named eth0, the second identified is eth2, and so on. This may lead to when you have configured the network profile in eth0. When the eth0 network card is broken. We bought a new network card or plugged it back into the original slot, but the name of the network card has been changed to eth2. This will cause the previous network profile to be unavailable. This situation has been improved on centos 7, which we will explain in the third chapter.
Ifconfig command (effective immediately, but invalidated after restarting the system)
Ifconfig [interface]
# ifconfig-a
[root@localhost ~] # ifconfig-aeth0 Link encap:Ethernet HWaddr 08:00:27:78:CB:FC inet addr:192.168.0.114 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe78:cbfc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:189 errors:0 dropped:0 overruns:0 frame:0 TX packets:308 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:20800 (20.3 KiB) TX bytes:53808 (52.5 KiB) Base address:0xd010 Memory:f0000000-f0020000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: 1swap 128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 b) TX bytes:560 (560.0 b) # displays all network card information
# ifconfig IFACE [up | down]
# disable or enable the specified network card eth0 [root@localhost ~] # ifconfig eth0 down [root@localhost ~] # ifconfig eth0 up
Ifconfig interface [aftype] options | address...
# ifconfig IFACE IP/mask [up]
# configure the IP address for eth0, followed by directly specifying the number of mask bits [root@localhost ~] # ifconfig eth0 192.168.1.1 and 24
# ifconfig IFACE IP netmask MASK
# configure IP address for eth0, then enter netmask+ mask [root@localhost ~] # ifconfig eth0 192.168.1.1 netmask 255.255.255.0
Route command (route management command)
View: route-n
[root@localhost ~] # route-nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface192.168.0.0 0.0.0.0 255.255.255.0 U 00 eth00.0.0.0 192.168.0.1 0.0.0.0 UG 00 eth0
Add: route add
Route add [- net |-host] target [netmask Nm] [gw Gw] [[dev] If]
# specify the destination host gateway to 192.168.0.88 as 192.168.0.1, forward [root@localhost ~] # route add-host 192.168.0.88 gw 192.168.0.1 dev eth0 [root@localhost ~] # route-nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface192.168.0.88 192.168.0.1 255.255.255.255 UGH 2000 eth0 via the eth0 Nic
Where Flags is the routing flag that marks the status of the current network node:
U Up indicates that this route is currently started
H Host, indicating that this gateway is a host
G Gateway, indicating that this gateway is a router
R Reinstate Route, routes that are reinitialized with dynamic rout
D Dynamically, this route is dynamically written to
M Modified, this route is dynamically modified by the routing daemon or director
! Indicates that this route is currently turned off
# specify 192.168.0.1 as the destination network gateway to 192.168.0.0 Forward [root@localhost ~] # route add-net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1 dev eth0 [root@localhost ~] # route add-net 192.168.0.0 root@localhost 24 gw 192.168.0.1 dev eth0 [root@localhost ~] # route-nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface192.168.0.0 192.168.0.1 via the Nic. 255.255.255.0 UG 0 0 0 eth0
# specifies that the gateway is the default route of 192.168.0.1. Only one default route needs to be added. Add multiple entries subject to the first clause [root@localhost ~] # route add-net 0.0.0.0 eth0 32 gw 192.168.0.1 [root@localhost ~] # route add default gw 192.168.0.1 [root@localhost ~] # route-nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 192.168.0.1 0.0.0.0 UG 000 eth0
Delete: route del
Route del [- net |-host] target [gw Gw] [netmask Nm] [[dev] If]
# Delete host route [root@localhost ~] # route del-host 192.168.0.8 "Delete network route [root@localhost] # route del-net 192.168.0.0 netmask 255.255.255." Delete default route [root@localhost ~] # route del default
The DNS server specifies:
Edit: / etc/resolv.conf
Nameserver DNS_SERVER_IP1 (nameserver 8.8.8.8)
Nameserver DNS_SERVER_IP2
Nameserver DNS_SERVER_IP3
FQDN: (Fully Qualified Domain Name) fully qualified domain name / full domain name, which refers to the host name plus the full path, which lists all domain members in the sequence. The full domain name can logically accurately indicate where the host is, and it can also be said that the full domain name is a complete representation of the host name. The location of the host in the domain name tree can be seen from the information contained in the full domain name. DNS parsing process: first look up the native HOSTS table, some directly use the definition in the table, and he parses the DNS server that is not set up in the network connection.
Positive solution: FQDN-- > IP (www.google.com-- > 216.58.221.36)
# dig-t A FQDN
[root@localhost ~] # dig-t A www.google.com; DiG 9.3.4-P1-t A www.google.com;; global options: printcmd;; Got answer:;;-> HEADERwww.google.com)
# dig-x IP
[root@localhost] # dig-x 216.58.221.36; DiG 9.3.4-P1-x 216.58.221.36; global options: printcmd;; Got answer:;;-> > HEADER
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.