RJ-45
:
1. , .
2. , . , , .
.
3. , . , .
4. , .
5. RJ-45
6. , .
7. , , .
.
: T568A Siemon T568B AT&T. .
: T568A
: -, , -, . .
: T568B
: -, , -, . .
( )
, 2 :
1. 2 .
2. 2 Hub/Switch
.
, , , . RJ-45. / .
1. , .
2. .
3. .
4. , RJ-45 , .
5. , . , .
6. . , , , , . , , .
.
(1-5 ) , , .
|
|
VLAN (. . Virtual Local Area Network) () , , , , . VLAN , , , . .
́ ́ (́) (. broadcast domain) , , . () OSI, .
́ ́ ( . co axis , ), (. coaxial), , . . .
Linux , Ubuntu, ifconfig.
, . .
eth0 Link encap:Ethernet HWaddr 00:04:75:c1:e2:ab
inet addr:10.2.10.32 Bcast:10.2.10.255 Mask:255.255.255.0
.
.
eth1 Link encap:Ethernet HWaddr 00:04:75:c1:e2:6b
inet addr:192.168.140.1 Bcast:192.168.140.255 Mask:255.255.255.0
.
.
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
.
.
, . ifconfig eth0 eth0. eth0 .
sudo ifconfig eth0 down
sudo ifconfig eth0 up
, .
.
sudo ifconfig eth1 inet 192.168.140.1
ip eth1 192.168.140.1
sudo ifconfig eth0 hw ether 00:12:34:56:78:90
00:12:34:56:78:90
sudo ifconfig eth0 netmask 255.255.255.0
eth0 255.255.255.0
.
, /etc/network/interfaces .
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
|
|
iface eth0 inet static
address 10.2.10.32
#hwaddress ether 12:34:56:78:90:12
netmask 255.255.255.0
network 10.2.10.0
broadcast 10.2.10.255
gateway 10.2.10.1
dns-nameservers 212.212.45.174
# The secondary network interface
auto eth1
iface eth1 inet static
address 192.168.140.1
netmask 255.255.255.0
. DNS /etc/network/interfaces, DNS Ubuntu /etc/resolv.conf, , ,
nameserver 80.227.64.17
nameserver 80.231.56.1
sudo / etc / init.d / networking restart
DHCP, /etc/network/interfaces
auto eth0
iface eth0 inet auto
DHCP
dhclient
sudo / etc / init.d / networking stop
sudo / etc / init.d / networking start
eth0 mac . .
mac .
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 12:34:56:78:90:12
sudo ifconfig eth0 up
sudo / etc / init.d / networking restart
, bash-.
/home/user mynetconfig
echo "########OTKLYCHENIE eth0#######"
sudo ifconfig eth0 down
echo "#####MENYAEM MAC ADRES#####"
sudo ifconfig eth0 hw ether 00:13:8f:cb:10:21
echo "########VKLUCHAEM eth0#########"
sudo ifconfig eth0 up
echo "####PEREZAGRYGAEM NETWORKING####"
sudo / etc / init.d / networking restart
echo "KONEC"
/home/user/mynetconfig
. mynetconfig /use/local/bin mynetconfig.
. .
, /etc/init.d/, , /etc/init.d/ .
update-rc.d mynetconfig defaults 99
:
mynetconfig -
defaults -
99 -
/etc/init.d/
update-rc.d -f mynetconfig remove
, /etc/rc.local , .
, , .
- ( , , DHCP) Windows XP:
, >>>>
Windows 7:
,
1. .
2.
3. , , , .
4. - ip- , .
|
|
5. IP- 169.254.x.x ( APIPA) , " IP- ", DHCP- ( ) .
6. DHCP , IP (????)
7. -
8. . bonjour ().
: . c:\program files\bonjour "mDNSResponder -remove" - . mdnsnsp.dll - . . :\program files\bonjour. "netsh winsock reset" winsock
"
9. -> -> -> -> regedit "" ( Windows) -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run -> "Adobe ARM", "". .
PING TCP/IP , , .
:
C:> ping <IP >
Pinging 160.82.52.11 with 32 bytes of data:
Reply from 160.82.52.11: bytes=32 time=10ms TTL=252
Reply from 160.82.52.11: bytes=32 time<10ms TTL=252
Reply from 160.82.52.11: bytes=32 time<10ms TTL=252
Reply from 160.82.52.11: bytes=32 time<10ms TTL=252
, 32 160.82.52.11 - 10 , .
PING ( ).
ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list
-t | . |
-a | . |
-n count | -. |
-l size | . |
-f | " ". |
-i TTL | . |
-v TOS | . |
-r count | . |
-s count | . |
-j host-list | Loose source route along host-list. |
-k host-list | Strict source route along host-list. |
-w timeout | ( ). |
ping () url ()-t Enter.
. http.
traceroute , TCP/IP. Traceroute ICMP.
traceroute , , . - , .
traceroute . Microsoft Windows tracert, GNU/Linux traceroute.
IP , IP . , , IP . , , , , .
|
|
(- cmd) tracert mail.ru enter.
Microsoft Windows Netsh .
Netsh .
Netsh . , .
Netsh , . netsh , .
1. DNS (. Domain Name System ) - .
DNS - , IP- ( ).
*!!!
* - , ...
DNS 1 ... 2 , 48 ( ).
DNS - (.. ), DNS-**
**DNS- - : , yandex.ru - dns :)
, :
(, Internet Explorer, Opera, Mozilla Firefox) => , , yandex.ru (.. ) => DNS ( , ), ip yandex.ru => *** DNS , yandex.ru ip ... => **** , ip , ip, ...
*** - ip , DNS DNS , ( :.ru) => ip , => ****
.. , yandex.ru - , ... , ?:) , : :\ \ \\...
, DNS yandex.ru... ( ) :)
DNS - . dns1 dns2 IP URL . , . dns. , , -, 4- . , 4- .
DNS-:
IP- ,
,
.
2. DHCP - TCP/IP, IP-. ( " IP-"). TCP/IP - IP-, . IP-. , , . , . DHCP "", IP-, . Windows Internet Naming Service (WINS) Domain Name Service (DNS), IP- WINS DNS-.
|
|
, . . - DHCP- , IP- . , , .
DHCP-? Dynamic Host Configuration Protocol ( ) , , IP- TCP/IP.
DHCP- , . , DHCP, , . , . , , . , , . . , IP- . DHCP- , , .
DHCP-
DHCP- . :
. , DHCP- , IP-;
. , , , IP- , , IP- DNS-, ( ), , ;
. ( , , , . .) IP-. ( , , 192.168..110). , IP-, , , ..;
DHCP-. .
DHCP- . , TCP/IP.
.
:
A.
"" . : 1 - 126. : 255.0.0.0, 16777216 (256*256*256). : 125.*.*.*
B.
"" . : 128.0 - 191.255, : 255.255.0.0, 65536 (256*256). : 136.12.*.*
C.
"" . : 192.0.0 - 255.254.255, : 255.255.255.0, 254 . : 195.136.12.*
.
IP- (v4) 32-. IPv6 - 128 .
IPv4-, , , . , : 192.168.11.10.
IP- source IP destination IP: ( ) (). . IP- . . 32- 32 .
IP- ( ) , . : IP-.
. , [], . (- , IP-.) , , ( , ). , .
32-. IP-, . - , - .
120.22.123.12=01111000.00010110.01111011.00001100.
255.255.248.0=11111111.11111111.11111000.00000000.
N , 32-N . , . N, . : 192.168.11.10/21 192.168.11.10 255.255.248.0. , .
, ( ) IP- , .
: ? , , , IP- . : 192.168.111.64 255.255.255.192? .
, :
1) ;
, . IP- , .
1) ;
IP-, . , . .
2) (Broadcast).
. , .
, 255 (, 192.168.111.255), 0 (, 192.168.111.0). , , , 255.255.255.0 ( є ), broadcast 255, 0. broadcast , 192.168.111.64, 192.168.111.127.
, , є . , . , 256-192 = 64 ( 192 ) 64 62 , 2 . IP- 192.168.111.0, 192.168.111.64, 192.168.111.128, 192.168.111.192 ( ip- ). , IP- C 256, 4 .
, , : 192.168.111.64 .
, : ? . 3. , 2 . 4. ? .
:
1) (255.255.255.192);
, .
2) (11111111.11111111.11111111.11000000).
, : 192.168.111.0/26, 192.168.111.0 , /26 .
(!) . .. 11111111.11111111.11111111.1100 11 00 . 8 C ( , ). , 11111111 , , 11111110 , , . . 11111100 4- , boradcast, . (gateway), .
, 4- .
, , , . , , . , , . , !
SMTP, FTP, POP3, HTTP, HTTPS
TCP/IP
.
. Enter . , , , , . , , .
, , , .
, , , .
TCP/IP.
IP , . OSI.