Α,νομιζα οτι το #6 ειναι ξεχωριστο ερωτημα :/
Οποτε με 4 μπιτς για υποδικτυο και χοστ:
υποδικτυο #16
11011100.10000111.10101010.00010000
host # 10 (dec)
11011100.10000111.10101010.00011010 = 220.133.175. 26 ?
και #5
1ο εγκυρο = x.x.x.16
1st valid host: x.x.x.17
last valid host = x.x.x.30
Damn,μπερδευεσαι πολυ ευκολα..Ενας τροπος να το θυμασαι ειναι να βαλεις εναν ασσο στο περισσοτερο σημαντικο μπιτ του υποδικτυου, και να θυμασαι οτι ο αριθμος του μερους του δικτυου αυξανει κατα αυτο το ποσο (πχ , 16 σε αυτη την περιπτωση)
έγραψε:Οσο για το μπερδεμα με τις MAC ειπαμε πως δεν θέλουμε να κάνουμε επεξεργασια ως το επιπεδο δικτύου μεσα σε ενα τοπικο δικτυο
οταν η πληροφορια ερχεται απο μεσα και κατευθυνεται παλι προς τα μεσα , ειπαμε επισης πως η διευθυνσιοδοτηση σε αυτο το επιπεδο γινεται με βαση τις MAC και το αιτιολογησαμε για τον παραπανω λογο αλλα εχει και αλλους . Το ARP Packet που στελνεις τι πακετο ειναι? IP packet λενε οτι ειναι αυτο σημαινει επεξεργασια ως το επιπεδο δικτυου αυτο που ειπες εσυ δηλαδη αυτο ειναι απαραιτητο μονο οταν οι παραπανω οντοτητες A-ROUTER-B δεν έχουν γνωση των γειτονων και μεχρι να δημιουργησουν τον πινακα τους με την αντιστοιχηση καταχωρηση.
ΑΠο εκει και μετα τα πλαισια που μεταδιδονται μεσα στο τοπικο ειναι ethernet τα ethernet πλαισια δεν εχουν πανω καποια IP εχουν μονο τις MAC. Για αυτο για να επικοινωνησεις με τον αλλον πρεπει να ξες την MAC του στα πλαισια του τοπικου δικτυου
Μα ναι, σε επικοινωνια σε τοπικο δικτυο δεν διαφωνουμε, τα παντα γινονται μεσω MAC,αφου οι IP εχουν τον ιδιο αριθμο (υπο)δικτυου.Εγω ρωτησα για επικοινωνια μεταξυ κομβων σε διαφορετικα δικτυα.Βρηκα ενα τουτόριαλ το οποιο λεει:
5.2 Indirect Routing
- Κώδικας: Επιλογή όλων
The figure below is a more realistic view of an internet. It is
composed of 3 Ethernets and 3 IP networks connected by an IP-router
called computer D. Each IP network has 4 computers; each computer
has its own IP address and Ethernet address.
A B C ----D---- E F G
| | | | | | | | |
--o------o------o------o- | -o------o------o------o--
Ethernet 1 | Ethernet 2
IP network "development" | IP network "accounting"
|
|
| H I J
| | | |
--o-----o------o------o--
Ethernet 3
IP network "factory"
Figure 7. Three IP Networks; One internet
Except for computer D, each computer has a TCP/IP protocol stack like
that in Figure 1. Computer D is the IP-router; it is connected to
all 3 networks and therefore has 3 IP addresses and 3 Ethernet
addresses. Computer D has a TCP/IP protocol stack similar to that in
Figure 3, except that it has 3 ARP modules and 3 Ethernet drivers
instead of 2. Please note that computer D has only one IP module.
The network manager has assigned a unique number, called an IP
network number, to each of the Ethernets. The IP network numbers are
not shown in this diagram, just the network names.
When computer A sends an IP packet to computer B, the process is
identical to the single network example above. Any communication
between computers located on a single IP network matches the direct
routing example discussed previously.
When computer D and A communicate, it is direct communication. When
computer D and E communicate, it is direct communication. When
computer D and H communicate, it is direct communication. This is
because each of these pairs of computers is on the same IP network.
However, when computer A communicates with a computer on the far side
of the IP-router, communication is no longer direct. A must use D to
forward the IP packet to the next IP network. This communication is
called "indirect".
This routing of IP packets is done by IP modules and happens
transparently to TCP, UDP, and the network applications.
If A sends an IP packet to E, the source IP address and the source
Ethernet address are A's. The destination IP address is E's, but
because A's IP module sends the IP packet to D for forwarding, the
destination Ethernet address is D's.
----------------------------------------
|address source destination|
----------------------------------------
|IP header A E |
|Ethernet header A D |
----------------------------------------
TABLE 6. Addresses in an Ethernet frame for an IP packet
from A to E (before D)
D's IP module receives the IP packet and upon examining the
destination IP address, says "This is not my IP address," and sends
the IP packet directly to E.
----------------------------------------
|address source destination|
----------------------------------------
|IP header A E |
|Ethernet header D E |
----------------------------------------
TABLE 7. Addresses in an Ethernet frame for an IP packet
from A to E (after D)
In summary, for direct communication, both the source IP address and
the source Ethernet address is the sender's, and the destination IP
address and the destination Ethernet address is the recipient's. For
indirect communication, the IP address and Ethernet addresses do not
pair up in this way.
This example internet is a very simple one. Real networks are often
complicated by many factors, resulting in multiple IP-routers and
several types of physical networks. This example internet might have
come about because the network manager wanted to split a large
Ethernet in order to localize Ethernet broadcast traffic.
http://tools.ietf.org/html/rfc1180#section-1
1 Γνώσεις Linux: Ελπίζω τουλ. μέτρια ┃ Προγραμματισμού: Καλή ┃ Αγγλικών: Very best englands
2 Ubuntu 15.10 wily 64bit (en_US.UTF-8),
3 Intel Core i5-3210M CPU @ 2.50GHz ‖ RAM 3843 MiB ‖ SAMSUNG ELECTRONICS CO., LTD. NP350E5C-S03GR [...]
4 Intel 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) ⋮ [AMD/ATI] Thames [Radeon HD 7500M/7600M Series] [1002:6840] (rev ff)
5 enp2s0: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 09) ⋮ wlp3s0: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)