|
Search |
Voit tilata IP-lohkon suoraan virtuaaliräkkiäsi varten hallintapaneelista. Kirjaudu sisään ja valitse virtuaaliräkki. Klikkaa ja ja vahvista tilauksesi.Jos sinulla on jo IP-lohko, mutta se on jo asennettu jollekin palvelimelle, voit siirtää sen. Palvelimen ei tarvitse olla osa virtuaaliräkkiä.
Kirjaudu hallintapaneeliin ja valitse palvelin, jolla lohko sijaitsee. Mene sitten , valitse lohko ja klikkaa ![]() Valitse "Muuta reititys" ja valitse kohteeksi VrackXXXX. Kehotamme asentamaan seuraavat paketit administroinnin helpottamiseksi:
Asenna yllämainitut paketit: testvrack1:~# apt-get install vlan netcat fping tcpdump netmask Muokkaa verkon konfiguraatiotiedostoa /etc/network/interfaces ja lisää seuraavat: auto eth0.2009::0 iface eth0.2009::0 inet static address 178.33.8.72 # palvelimen osoite IP network 178.33.8.64 # RIPE-lohkon ensimmäinen IP broadcast 178.33.8.79 # RIPE-lohkon viimeinen IP netmask 255.255.255.240 # peitteen saamiseksi aja komento: netmask -s blokin_ip (esim: 178.33.8.64/28) Uudelleenkäynnistä verkko: /etc/init.d/networking restart Tarkista: testvrack1:~#ifconfig eth0 Link encap:Ethernet HWaddr 00:1c:c0:b9:98:f3 inet adr:94.23.196.195 Bcast:94.23.196.255 Masque:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:48325 errors:0 dropped:0 overruns:0 frame:0 TX packets:28121 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:4033662 (3.8 MiB) TX bytes:3680376 (3.5 MiB) M�moire:e0200000-e0220000 eth0.2009 Link encap:Ethernet HWaddr 00:1c:c0:b9:98:f3 inet adr:10.0.0.1 Bcast:10.255.255.255 Masque:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3726 errors:0 dropped:0 overruns:0 frame:0 TX packets:2775 errors:0 dropped:4 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:174402 (170.3 KiB) TX bytes:181332 (177.0 KiB) eth0.2009::0 Link encap:Ethernet HWaddr 00:1c:c0:b9:98:f3 inet adr:178.33.8.71 Bcast:178.33.8.79 Masque:255.255.255.240 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 lo Link encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1291 errors:0 dropped:0 overruns:0 frame:0 TX packets:1291 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:146137 (142.7 KiB) TX bytes:146137 (142.7 KiB) testvrack1:~# route -n IP Routing Table Destination Passerelle Genmask Indic Metric Ref Use Iface 178.33.8.64 0.0.0.0 255.255.255.240 U 0 0 0 eth0.2009 94.23.196.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0.2009 0.0.0.0 10.255.255.254 0.0.0.0 UG 0 0 0 eth0.2009 0.0.0.0 94.23.196.254 0.0.0.0 UG 0 0 0 eth0 Testaa pingaamalla yhdyskäytävää: testvrack1:~# ping 178.33.8.79 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.255.255.254: icmp_seq=1 ttl=63 time=9.46 ms 64 bytes from 10.255.255.254: icmp_seq=2 ttl=63 time=0.219 ms Voit samalla testata muutkin palvelimet: testvrack1:~# ping 178.33.8.72 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=8.83 ms 64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=0.220 ms
Asenna paketit: testvrack1:~# emerge vconfig netcat fping tcpdump whatmask Muokkaa verkon konfiguraatiotiedostoa /etc/conf.d/net ja lisää virtuaaliräkin tagi: vlans_eth0="XXXX" vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" ) config_vlanXXXX=( "10.0.0.1 netmask 255.0.0.0" "IP.FAIL.OVER.RIPE netmask MASQUE.DE.VOTRE.RESEAU brd IP.DE.BROADCAST.RIPE") Lue verkon peite: whatmask 178.33.8.64/28 Esim: 178.33.8.71 block 178.33.8.64/28: vlans_eth0="2009" vconfig_eth0=("set_name_type VLAN_PLUS_VID_NO_PAD") config_vlan2009=( "10.0.0.1 netmask 255.0.0.0" "178.33.8.71 netmask 255.255.255.240 brd 178.33.8.79") Käynnistä verkko uudelleen: /etc/init.d/net.eth0 restart Tarkista konfiguraatio: testvrack1 ~ # ip addr show 1: lo: link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo 2: eth0: link/ether 00:1c:c0:b9:98:f3 brd ff:ff:ff:ff:ff:ff inet 94.23.196.195/24 brd 94.23.196.255 scope global eth0 inet 213.186.37.47/32 brd 213.186.37.47 scope global eth0 3: dummy0: link/ether 66:cf:9f:b3:f7:69 brd ff:ff:ff:ff:ff:ff 4: tunl0: link/ipip 0.0.0.0 brd 0.0.0.0 5: gre0: link/gre 0.0.0.0 brd 0.0.0.0 11: vlan2009@eth0: link/ether 00:1c:c0:b9:98:f3 brd ff:ff:ff:ff:ff:ff inet 10.0.0.1/8 brd 10.255.255.255 scope global vlan2009 inet 178.33.8.71/28 brd 178.33.8.79 scope global vlan2009 testvrack1 ~ # route -n IP Routing Tables Destination Passerelle Genmask Indic Metric Ref Use Iface 178.33.8.64 0.0.0.0 255.255.255.240 U 0 0 0 vlan2009 94.23.196.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 vlan2009 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 94.23.196.254 0.0.0.0 UG 0 0 0 eth0 Testaa pingaamalla yhdyskäytävää: testvrack1:~# ping 178.33.8.79 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.255.255.254: icmp_seq=1 ttl=63 time=9.46 ms 64 bytes from 10.255.255.254: icmp_seq=2 ttl=63 time=0.219 ms Testaa myös muut palvelimet: testvrack1:~# ping 178.33.8.72 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. 64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=8.83 ms 64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=0.220 ms
Asenna paketit: testvrack2:~# yum install vconfig tcpdump Asentaaksesi fpingin kirjoita: wget http://fping.sourceforge.net/download/fping.tar.gz tar zxvf fping.tar.gz cd fping-2.4b2_to/ ./configure make make install Asentaaksesi whatmaskin: Waiting compiled rpm Kopioidaan konfiguraatiotiedosto ja lisätään virtuaalisen rajapinnan numero: cp /etc/sysconfig/network-scripts/ifcfg-eth0.XXXX /etc/sysconfig/network-scripts/ifcfg-eth0.XXXX:0 Lisää editointia: VLAN=yes BOOTPROTO=static IPADDR=178.33.8.72 # Put here RIPE IP FailOver? you want to assign to this server NETMASK=255.255.255.240 # Put here the first ip of your RIPE block ONBOOT=yes BROADCAST=178.33.8.79 # Put here the last ip your RIPE block Verkkorajapinnan asennus: Tarkistus: eth0 Link encap:Ethernet HWaddr 00:1C:C0:BA:D4:54 inet addr:94.23.196.217 Bcast:94.23.196.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:319842 errors:0 dropped:0 overruns:0 frame:0 TX packets:267546 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:366903141 (349.9 MiB) TX bytes:228654217 (218.0 MiB) Memory:e0200000-e0220000 eth0.2009 Link encap:Ethernet HWaddr 00:1C:C0:BA:D4:54 inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:110446 errors:0 dropped:0 overruns:0 frame:0 TX packets:45326 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:110613350 (105.4 MiB) TX bytes:108015196 (103.0 MiB) eth0.2009::0 Link encap:Ethernet HWaddr 00:1C:C0:BA:D4:54 inet addr:178.33.8.72 Bcast:178.33.8.79 Mask:255.255.255.240 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:140 errors:0 dropped:0 overruns:0 frame:0 TX packets:140 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:19479 (19.0 KiB) TX bytes:19479 (19.0 KiB) root@testvrack2 ~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 178.33.8.64 0.0.0.0 255.255.255.240 U 0 0 0 eth0.2009 94.23.196.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0.2009 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0.2009 0.0.0.0 94.23.196.254 0.0.0.0 UG 0 0 0 eth0 Testataan konfiguraatiota pingaamalla yhdyskäytävää: PING 10.255.255.254 (10.255.255.254) 56(84) bytes of data. 64 bytes from 10.255.255.254: icmp_seq=1 ttl=255 time=8.36 ms 64 bytes from 10.255.255.254: icmp_seq=2 ttl=255 time=0.407 ms 64 bytes from 10.255.255.254: icmp_seq=3 ttl=255 time=0.388 ms PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=63 time=11.4 ms 64 bytes from 10.0.0.1: icmp_seq=2 ttl=63 time=0.218 ms 64 bytes from 10.0.0.1: icmp_seq=3 ttl=63 time=0.213 ms |
|||||||||||