User Tools

Site Tools


настройка_сети

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
настройка_сети [2011/02/15 12:19]
val removed
— (current)
Line 1: Line 1:
-====== Настройка сети ====== 
- 
-===== Файлы конфигурации ===== 
- 
-==== Файл /​etc/​rc.conf ==== 
-<​code>​ 
-ifconfig_em0="​inet 172.16.1.X/​24"​ 
-defaultrouter="​172.16.1.254"​ 
- 
-# Alias example 
-# ifconfig_em0_alias0="​inet 172.16.1.100+X/​32"​ 
-# ifconfig_em0_alias1="​inet 172.16.1.200+X/​32"​ 
-# ifconfig_em0_alias2="​inet 10.5.Z.X/​24"​ 
- 
-# 802.1q example 
-# cloned_interfaces="​vlan2 vlan3" 
-# ifconfig_vlan2="​inet 172.16.2.X/​24 vlan 2 vlandev em0" 
-# ifconfig_vlan3="​inet 172.16.3.X/​24 vlan 3 vlandev em0" 
- 
-</​code>​ 
- 
-==== Файл /etc/hosts ==== 
-<​code>​ 
-[hostX:~] # cat /etc/hosts 
- 
-172.16.1.Y hostY 
-172.16.1.254 gate 
-</​code>​ 
- 
-==== Файл /​etc/​resolv.conf ==== 
-<​code> ​ 
-[hostX:~] # cat /​etc/​resolv.conf ​ 
-domain ​ class.un 
-nameserver ​     172.16.1.254 
-</​code>​ 
- 
-===== Команды для настройки ===== 
- 
-==== ifconfig ==== 
-<​code>​ 
-# ifconfig em0 -alias 
- 
-# ifconfig em0 inet 172.16.1.X/​24 
- 
-# ifconfig em0 inet 10.5.Z.X/24 alias 
- 
-# /​etc/​rc.d/​netif start 
-</​code>​ 
- 
-==== route ==== 
-<​code>​ 
-route -n flush 
- 
-route add default 172.16.1.254 
- 
-/​etc/​rc.d/​routing start 
-</​code>​ 
-===== Команды для диагностики ===== 
-<​code>​ 
-Команда  ​       Ключи 
-arp         -a -d 
-ping         -s размер 
-netstat -rn –f inet 
-netstat ​        –I интерфейс -inb 
-netstat ​        –I интерфейс -inb -w 1 
-traceroute  
-sockstat -4 
-tcpdump  ​       -i em0 -n -s 0 -X "port 21 and host 172.16.1.X"​ 
-nslookup  
-</​code>​ 
  
настройка_сети.1297761553.txt.gz · Last modified: 2013/05/22 13:50 (external edit)