Placeholder Image

字幕列表 影片播放

  • What is a default gateway? So that is the topic of this video.

    什麼是默認網關?所以這就是這個視頻的主題。

  • Now as a demonstration on a Windows computer, let's  check the network configuration. So if you open up  

    現在作為在 Windows 計算機上的演示,讓我們檢查網絡配置。因此,如果您打開

  • a command prompt and then you type in ipconfig  and in the output you'll see the IP address,  

    命令提示符,然後輸入 ipconfig,在輸出中您將看到 IP 地址、

  • subnet mask, and the default gateway that's  been assigned to this computer. So you might  

    子網掩碼和分配給這台計算機的默認網關。所以你可能

  • be asking yourself, well what is a default gateway? And simply put, a default gateway is a device that  

    會問自己,什麼是默認網關?簡單地說,默認網關是一種

  • forwards data from one network to another. And the  majority of the time, this is going to be a router.  

    將數據從一個網絡轉發到另一個網絡 的設備 。大多數時候,這將是一個路由器。

  • So for example here we have a local area networkSo here is the router, switch, and the computers.  

    例如,這裡我們有一個局域網。所以這裡是路由器、交換機和計算機。

  • And on the other side of the router we have the  internet, which is another network. So in order for  

    在路由器的另一端,我們有互聯網,這是另一個網絡。因此,為了讓

  • these computers to access another network, such  as a web page out on the internet, the data has  

    這些計算機訪問另一個網絡,例如 Internet 上的網頁,數據必須

  • to exit its own local network by going through the  default gateway, which is the router. And then the  

    通過默認網關(即路由器)退出其本地網絡。然後

  • router will forward the data to the internet. Now  this also works both ways. So if a device on the  

    路由器將數據轉發到互聯網。現在這也適用於兩種方式。因此,如果 Internet

  • internet wanted to communicate with a computer on  this network, it has to go through this network's  

    上的設備 想要與該網絡上的計算機通信,它必須通過該網絡的

  • default gateway and then to the computer. So  in a nutshell, that's what a default gateway is.  

    默認網關,然後到達該計算機。簡而言之,這就是默認網關。

  • It lets devices from one network communicate with  devices on another network. And as I said before,  

    它允許來自一個網絡的設備與另一個網絡上的設備進行通信。正如我之前所說,

  • this is typically going to be a router. A router  is the gateway or doorway to every network. And 

    這通常是一個路由器。路由器是每個網絡的網關或入口。

  • the term default means that the designated  device is the first option that's looked upon  

    而 默認一詞意指指定設備 , 這 時候數據需要退出網絡

  • when data needs to exit the network. Now if these  computers here wanted to communicate with each  

    看低第一個選項 。現在,如果這裡的這些計算機想要相互通信

  • other, they can just talk directly to each other  through the switch. And this is because all these  

    ,它們可以通過交換機直接相互 通信 。這是因為所有這些

  • computers are on the same network. Their data  doesn't have to exit the network and go through  

    計算機都在同一個網絡上。他們的數據不必退出網絡並通過

  • the default gateway. So this brings us to our next  question. And that is, if these computers wanted to  

    默認網關。所以這就引出了我們的下一個問題。也就是說,如果這些計算機想要

  • communicate with another computer, how do they know whether that computer is on their own network  

    與另一台計算機通信,它們如何知道該計算機是在自己的網絡上

  • or if it's on a different network. Because as I stated  before, if this computer wants to communicate with  

    還是在不同的網絡上。因為正如我之前所說的,如果這台計算機想要與

  • a computer on the same network, it can just talk  directly to it. But if it wants to communicate  

    同一網絡上的計算機 通信 ,它可以直接與之對話。但是如果它想

  • with a computer on a different network, it has  to go through the default gateway. So again how  

    與不同網絡上的計算機 通信 ,它必須通過默認網關。那麼 它又是

  • does it know? And this is where the IP address and  subnet mask come in. An IP address consists of two  

    怎麼 知道的呢?這就是 IP 地址和子網掩碼的用武之地。 IP 地址由兩

  • parts. The first part is the network address and  the second part is the host address. So the way to  

    部分組成。第一部分是網絡地址,第二部分是主機地址。因此,

  • tell which portion belongs to either the network  or the host, is where the subnet mask comes in.  

    判斷哪個部分屬於網絡或主機的方法是使用子網掩碼的地方。

  • A subnet mask is a number that resembles an IP  address. And it reveals how many bits in the IP  

    子網掩碼是一個類似於 IP 地址的數字。它 通過屏蔽 IP 地址的網絡部分來

  • address are used for the network by masking the  network portion of the IP address. So here we have  

    揭示 IP 地址中有 多少位 用於網絡。所以這裡我們有

  • the IP address and subnet mask in binary form. So the way to tell which portion of this IP address  

    二進制形式的IP地址和子網掩碼。因此,判斷此 IP 地址的哪一部分

  • is the network portion, is when the subnet mask  binary digit is a 1 it will indicate the position  

    是網絡部分的方法是,當子網掩碼二進制數字為 1 時,它將指示

  • of the IP address that defines the network. So   we'll cross out all the digits in the IP address  

    定義網絡的 IP 地址 的位置 。因此,我們將刪除 IP 地址

  • that line up with the 1s in the subnet mask. And  when you do this, it will reveal that the first  

    中與子網掩碼中的 1 對齊的 所有數字

  • three octets or sets are the network portion  and the remaining is the host portion. So any  

    。當你這樣做時,它會顯示前 三個八位字節或組是網絡部分,其餘是主機部分。因此

  • computer or device on a network where the first  three numbers of the IP address are 192.168.0  

    ,網絡中 IP 地址的前三個數字為 192.168.0 的 任何 計算機或設備都

  • means that those computers are on the same network. Which means that the computers can talk directly  

    意味著這些計算機位於同一網絡上。這意味著計算機可以直接

  • to each other without exiting through the default  gateway. And then the host portion is what's  

    相互 交談 ,而無需通過默認網關退出。然後主機部分是

  • uniquely assigned to devices, such as computersSo here we have a private network that has  

    唯一分配給設備的部分,例如計算機。所以這裡我們有一個私有網絡,它

  • been divided into two sub networks or subnets. The  subnet on the left is on the 192.168.0 network and the  

    被分成了兩個子網或子網。左側的子網位於 192.168.0 網絡 上,右側 的

  • subnet on the right is on the 192.168.1 networkAnd each subnet has their own default gateway.  

    子網位於 192.168.1 網絡上。每個子網都有自己的默認網關。

  • Now let's say that computer A wanted to  communicate with computer B on this subnet.  

    現在假設計算機 A 想要與此子網上的計算機 B 通信。

  • So computer A is going to check computer B's IP  address to see if it's on the same network or not

    所以計算機 A 將檢查計算機 B 的 IP 地址,看看它是否在同一網絡上。

  • And as you can tell, the two computers are on the  same network because the network portion of the IP  

    正如您所看到的,這兩台計算機位於同一網絡上,因為 IP 地址

  • addresses, which are the first three octets, are the  same. So computer A now knows that computer B is on  

    的網絡部分( 前三個八位字節)是相同的。所以計算機 A 現在知道計算機 B 在

  • the same network. So now in order for communication to take place, computer A needs computer B's MAC 

    同一網絡上。所以現在為了進行通信,計算機 A 需要計算機 B 的 MAC

  • address. And it finds this by sending out an ARP  broadcast out on the network asking computer B  

    地址。它通過在網絡上發出 ARP 廣播詢問計算機 B 的 MAC 地址 來發現這一點

  • for its MAC address. Then once it has the MAC  address, communication can finally take place.

    。然後一旦它有了 MAC 地址,就可以最終進行通信。

  • So in another scenario let's say that computer  A on this subnet here wanted to communicate with  

    因此,在另一種情況下,假設此子網上的計算機 A 想要與 此子網上的計算機 D

  • computer D on this subnet. So again computer  A is going to check computer D's IP address  

    通信 。因此,計算機 A 將再次檢查計算機 D 的 IP 地址,

  • to see if it's on the same network or not. And  as you can tell this time, the two computers  

    以查看它是否在同一網絡上。正如您這次所看到的,兩台計算機

  • are on different networks because the network  portion of the IP addresses, which are the first  

    位於不同的網絡上,因為 IP 地址的網絡部分(前

  • three octets, are different. And the difference  is the third number. Computer A is using a 0 

    三個八位字節)不同。不同的是第三個數字。計算機 A 使用的是 0

  • and computer D is using a 1. So computer A now  knows that computer D is on a different network.  

    ,計算機 D 使用的是 1。因此計算機 A 現在知道計算機 D 位於不同的網絡上。

  • So it can't directly communicate with it, it has  to use the default gateway. So computer A will  

    所以它不能直接與之通信,它必須使用默認網關。所以計算機 A 將

  • send out an ARP broadcast and this time it'll ask  for the MAC address of the default gateway and not  

    發出一個 ARP 廣播,這次它會詢問默認網關的 MAC 地址而不是

  • the computer, because computer D is on a different  network and it won't receive the broadcast because  

    計算機,因為計算機 D 在不同的網絡上,它不會收到廣播,因為

  • ARP broadcasts cannot go past a router. Then once  it has the MAC address, it'll send the data to the  

    ARP 廣播不能去經過路由器。然後一旦它有了 MAC 地址,它就會將數據發送到

  • default gateway and then it'll be forwarded to the  destination. So everyone that concludes this video  

    默認網關,然後將其轉發到目的地。所以 在默認網關上

  • on default gateways. Thank you for watching, please  subscribe, and I'll see you in the next video.

    結束此視頻的每個人 。感謝收看,請訂閱,我們下期視頻再見。

What is a default gateway? So that is the topic of this video.

什麼是默認網關?所以這就是這個視頻的主題。

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋