التشبيك .
السلا م عليكم
هذه اول ترجمة لي لمقالات Openmaniak كما قلت في التدوينة السابقة :
1- اعداد الشبكة :
اعداد البطاقة الشبكة بالامر ifconfig :
الاعداد اليدوي للبطاقة هكذا
#ifconfig interface_name ip_address netmask mask #
ifconfig eth0 192.168.1.15 netmask 255.255.255.0 broadcast 192.168.1.255
اعداد المنفد او geteway
#route add default gateway ip_address dev interface_name
#route add default gateway 192.168.1.1 dev eth0
الاعداد الدينامكي :
# dhclient interface
#dhclient eth0
Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/aa:00:11:22:33:44
Sending on LPF/eth0/aa:00:11:22:33:44
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.130 — renewal in 1002089 seconds.
اعداد السرعة و الدوبلكس Duplex :
لمعرفة السرعة و Duplex قم بالامر :
#ethtool interface_name
#ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0×000000ff (255)
Link detected: yes
لا عداد duplex :
#ethtool interface_name -s duplex full|half autoneg off
لاعداد السرعة :
#ethtool interface_name -s 10|100|1000 autoneg off
#ethtool eth0 -s speed 100 duplex full autoneg off
لا سترجاع الاعدادات الاولية هكذا :
#ethtool interface_name -s autoneg on
#ethtool eth0 -s autoneg on
++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 – الاعدادا ت الدائمة لبطاقة :
الامر #ethtool interface_name -s autoneg on
سيختفي عند اعادة تشغيل الحاسوب او خدمات التشبيك
للمحافظة على الاعدادات افتح الملف etc/network/interfaces .
#vim /etc/network/interfaces
الاعدادت اليدوية هكذا :
auto eth0
iface eth0 inet static
address 192.168.1.15
netmask 255.255.255.0
gateway 192.168.1.1
الاعدادت الدينامكية :
auto eth0
iface eth0 inet dhcp
الاعدادات السرعة و الممرو Duplex :
auto eth0
iface eth0 inet static|dhcp
post-up /usr/bin/ethtool eth0 -s speed 100 duplex full autoneg off
post-up route add default gateway 192.168.1.1 dev eth0
3 – تفحص الشيكة :
لمعرفة معلومات البطائق و الاعداداتها
#ifconfig -a
لمعرفة اعدادات كل بطاقة منفردة
#ifconfig interface حيث inferface هو اسم البطاقة هذا مثل يوضح
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr AA:00:11:22:33:44
inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a800:4ff:0000:000/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1058 errors:0 dropped:0 overruns:0 frame:0
TX packets:638 errors:0 dropped:0 overruns:0 carrier:0
collisions:1 txqueuelen:1000
RX bytes:100716 (98.3 KiB) TX bytes:86309 (84.2 KiB)
Interrupt:169
لمعرفة منفد الشبكة االاولي
#route -n
Kernel IP routing table
| Destination 192.168.1.0 0.0.0.0 |
Gateway 0.0.0.0 192.168.1.1 |
Genmask 255.255.255.0 0.0.0.0 |
Flags U UG |
MSS 0 0 |
Window 0 0 |
irtt 0 0 |
Iface eth0 eth0 |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4- DNS ( نظام النطاقات )
يقوم dns او نطام النطاقات بترجمة او تحويل الاسماء النطاقات او FQDN الي ip ..
مثلا اي عندما تريد تصفح موقع كـ openmaniak.com فان dns يحول openmaniak.com اي ip _adress
و ابهات المواقع مخزنة في الملف /ect/resolv.conf و ادا كان ip _adress دينامكي من خلال dHCP فهو يعدل عليها اتوماتكيا باضافة اسماء النطاقات الي الملف السابق .
#vim /etc/resolv.conf
nameserver 192.168.1.1
و 192.168.1.1 هو ip-adress لDns .
و اتعرف على كيفية العملية التحويل او الترجمة هكذا
# dig openmaniak.com
<<>> DiG 9.3.2 <<>> openmaniak.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10055
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;openmaniak.com. IN A
;; ANSWER SECTION:
openmaniak.com. 76839 IN A 84.16.81.23
;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Apr 18 22:12:02 2007
;; MSG SIZE rcvd: 48
و للموضوع تتمة …