Openstack Basic Networking 翻译

自己翻译,加强理解、并学习英文和写作。

英文地址:http://docs.openstack.org/networking-guide/intro_basic_networking.html

目录:

基础网络

Ethernet以太网

Ethernet is a networking protocol, specified by the IEEE 802.3 standard. Most wired network interface cards (NICs) communicate using Ethernet.

Ethernet是一个网络协议, 由IEEE 802.3 标准制定的. 多数双绞线网卡 (NICs) 使用 Ethernet通信.

In the OSI model of networking protocols, Ethernet occupies the second layer, which is known as the data link layer. When discussing Ethernet, you will often hear terms such as local networklayer 2L2link layer and data link layer.

在 OSI网络协议模型中, Ethernet 位于第二层(也叫数据链路层). 当讨论Ethernet时, 你经常听到诸如 局域网, 二层, L2链路层和数据链路层.

In an Ethernet network, the hosts connected to the network communicate by exchanging frames, which is the Ethernet terminology for packets. Every host on an Ethernet network is uniquely identified by an address called the media access control (MAC) address. In particular, in an OpenStack environment, every virtual machine instance has a unique MAC address, which is different from the MAC address of the compute host. A MAC address has 48 bits and is typically represented as a hexadecimal string, such as 08:00:27:b9:88:74. The MAC address is hard-coded into the NIC by the manufacturer, although modern NICs allow you to change the MAC address programatically. In Linux, you can retrieve the MAC address of a NIC using the ip command:

在一个以太网中,连接到网络上的主机通过交换帧进行通信,帧是以太网数据包的术语。每个在一个以太网中的主机被一个叫做介质访问控制地址(MAC)唯一定义。特殊的是一个openstack 环境中,每个虚拟机实例有一个唯一的MAC地址,例如08:00:27:b9:88:74。 这个MAC地址是被制造商硬编码进网卡,然而现代化的网卡允许你通过编程改变MAC地址。在Linux中,你可以通过ip命令查询网卡的MAC地址:

$ ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:b9:88:74 brd ff:ff:ff:ff:ff:ff

Conceptually, you can think of an Ethernet network as a single bus that each of the network hosts connects to. In early implementations, an Ethernet network consisted of a single coaxial cable that hosts would tap into to connect to the network. Modern Ethernet networks do not use this approach, and instead each network host connects directly to a network device called a switch. Still, this conceptual model is useful, and in network diagrams (including those generated by the OpenStack dashboard) an Ethernet network is often depicted as if it was a single bus. You’ll sometimes hear an Ethernet network referred to as a layer 2 segment.

从概念上你可以把以太网想象成为一个每个网络主机都连上的单一总线。在早期的实现中,一个以太网由一个同轴电缆组成,主机通过监听同轴电缆接入网络。现代的以太网不使用这种方法,并且替换为每个主机直接地连接一个叫做交换机的网络设备。这个概念模型仍然是有用的,在网络图中(包括哪些通过OpenStack面板生产的)一个以太网经常被描述作为一个单一总线。你将会有些时候听到一个以太网被作为一个二层部分提到。

In an Ethernet network, every host on the network can send a frame directly to every other host. An Ethernet network also supports broadcasts, so that one host can send a frame to every host on the network by sending to the special MAC addressff:ff:ff:ff:ff:ffARP and DHCP are two notable protocols that use Ethernet broadcasts. Because Ethernet networks support broadcasts, you will sometimes hear an Ethernet network referred to as a broadcast domain.

在一个以太网中,每个网络上的主机可以直接发送一个帧到其他主机。一个以太网也支持广播,所以一个主机可以通过发送特殊的MAC 地址ff:ff:ff:ff:ff:ff向网络上的每个一个主机发送一个帧。 ARP and DHCP是二个值得注意的使用广播的协议。以为以太网支持广播,你会有些时候听到以太网被作为一个广播域提到。

When a NIC receives an Ethernet frame, by default the NIC checks to see if the destination MAC address matches the address of the NIC (or the broadcast address), and the Ethernet frame is discarded if the MAC address does not match. For a compute host, this behavior is undesirable because the frame may be intended for one of the instances. NICs can be configured for promiscuous mode, where they pass all Ethernet frames to the operating system, even if the MAC address does not match. Compute hosts should always have the appropriate NICs configured for promiscuous mode.

当一个网卡接收到一个以太网帧,这个网卡默认地检查目标MAC地址是否和网卡的MAC地址匹配(或者是广播地址),如果不匹配以太网帧会被丢弃掉。对于一个计算节点主机,这种行为是不受欢迎的,因为帧可能被其中的一个实例需要的。网卡可以被设置为混杂模式,这种模式下他把所有的帧都传给操作系统,即使MAC地址不匹配。计算节点主机应该总是有合适的可以配置为混杂模式的网卡。

As mentioned earlier, modern Ethernet networks use switches to interconnect the network hosts. A switch is a box of networking hardware with a large number of ports, that forwards Ethernet frames from one connected host to another. When hosts first send frames over the switch, the switch doesn’t know which MAC address is associated with which port. If an Ethernet frame is destined for an unknown MAC address, the switch broadcasts the frame to all ports. The port learns which MAC addresses are at which ports by observing the traffic. Once it knows which MAC address is associated with a port, it can send Ethernet frames to the correct port instead of broadcasting. The switch maintains the mappings of MAC addresses to switch ports in a table called aforwarding table or forwarding information base (FIB). Switches can be daisy-chained together, and the resulting connection of switches and hosts behaves like a single network.

像刚才提到的,现代以太网使用交换机互联网络主机。一个交换机是一个有很多数量端口的网络硬件盒子,它在把以太网帧从一个连接的主机转发到其他主机。当一个以太网帧的目的为一个未知的MAC地址时,交换机广播帧到所有的端口。端口通过观察流量学习到哪个MAC地址在哪个端口。一旦交换机知道MAC地址关联的端口,它就发送以太网帧到正确的端口而不再使用广播。交换机在一个叫转发表或者转发信息基地(FIB)维护了MAC地址到交换端口的映射。交换机可以以菊花形链接组合在一起,结果是交换机和主机连接表现的就像一个网络。

VLANs

VLAN is a networking technology that enables a single switch to act as if it was multiple independent switches. Specifically, two hosts that are connected to the same switch but on different VLANs do not see each other’s traffic. OpenStack is able to take advantage of VLANs to isolate the traffic of different tenants, even if the tenants happen to have instances running on the same compute host. Each VLAN has an associated numerical ID, between 1 and 4095. We say “VLAN 15” to refer to the VLAN with numerical ID of 15.

VLAN 是一个可以使一个交换机表现的像多个独立交换机的网络技术。 特别的,二个连接相同交换机的主机处于不同VLAN不能看到彼此的流量。OpenStack能够利用VLAN的好处来隔离不同租户间的流量,即使不同租户正好有实例运行在同一个主机上。每个VLAN有一个关联的数字ID,从1到4095。 我们说 “VLAN 15” 是指这个VLAN具有 ID 15.

To understand how VLANs work, let’s consider VLAN applications in a traditional IT environment, where physical hosts are attached to a physical switch, and no virtualization is involved. Imagine a scenario where you want three isolated networks, but you only have a single physical switch. The network administrator would choose three VLAN IDs, say, 10, 11, and 12, and would configure the switch to associate switchports with VLAN IDs. For example, switchport 2 might be associated with VLAN 10, switchport 3 might be associated with VLAN 11, and so forth. When a switchport is configured for a specific VLAN, it is called anaccess port. The switch is responsible for ensuring that the network traffic is isolated across the VLANs.

为了理解VLAN怎样的工作,让我们考虑在一个传统IT环境下考虑VLAN应用,物理主机被连接到物理交换机上,并且不涉及任何的虚拟化。 设想一下一个场景,当你需要3个隔离网络但你只有一个交换机。这个网络管理员将会挑选3个VLAN ID 10、11、12,并且配置交换机把交换端口和vlan 关联起来。 例如,端口2可能关联VLAN 10,端口3可能关联VLAN 11等等。当一个交换端口被配置为特定的VLAN,它被做一个接入口 access port。 交换机负责确保VLAN间的网络流量被隔离。

Now consider the scenario that all of the switchports in the first switch become occupied, and so the organization buys a second switch and connects it to the first switch to expand the available number of switchports. The second switch is also configured to support VLAN IDs 10, 11, and 12. Now imagine host A connected to switch 1 on a port configured for VLAN ID 10 sends an Ethernet frame intended for host B connected to switch 2 on a port configured for VLAN ID 10. When switch 1 forwards the Ethernet frame to switch 2, it must communicate that the frame is associated with VLAN ID 10.

If two switches are to be connected together, and the switches are configured for VLANs, then the switchports used for cross-connecting the switches must be configured to allow Ethernet frames from any VLAN to be forwarded to the other switch. In addition, the sending switch must tag each Ethernet frame with the VLAN ID so that the receiving switch can ensure that only hosts on the matching VLAN are eligible to receive the frame.

When a switchport is configured to pass frames from all VLANs and tag them with the VLAN IDs it is called a trunk port. IEEE 802.1Q is the network standard that describes how VLAN tags are encoded in Ethernet frames when trunking is being used.

Note that if you are using VLANs on your physical switches to implement tenant isolation in your OpenStack cloud, you must ensure that all of your switchports are configured as trunk ports.

It is important that you select a VLAN range that your current network infrastructure is not using. For example, if you estimate that your cloud must support a maximum of 100 projects, pick a VLAN range outside of that value, such as VLAN 200–299. OpenStack and all physical network infrastructure that handles tenant networks must then support this VLAN range.

Trunking is used to connect between different switches. Each trunk uses a tag to identify which VLAN is in use. This ensures that switches on the same VLAN can communicate.

时间: 2024-10-27 11:46:50

Openstack Basic Networking 翻译的相关文章

jquery ----&gt; How to Create a Basic Plugin (翻译)

http://learn.jquery.com/plugins/basic-plugin-creation/ 如何创建一个基本的插件 有时候你想在整个代码中提供一些功能. 例如,也许你想要一个单一的方法,你可以调用一个jQuery selection来对selection执行一系列操作. 在这种情况下,您可能需要编写一个插件. jQuery如何工作101:jQuery对象方法 在我们编写自己的插件之前,我们必须先了解一下jQuery的工作原理. 看看这个代码: 1 $( "a" ).c

OpenStack L3 HA agent and VRRP

OpenStack L3 HA agent and VRRP active/active 此方案描述利用了模块化layer 2 (ML2) 插件与Open vSwitch (OVS) OpenStack对 Networking Layer 3 High-Availability (L3 HA) 的一个基本实现. 在controller node 和network node 编辑配置文件/etc/neutron/neutron.conf allow_automatic_l3agent_failov

[译] 企业级 OpenStack 的六大需求(第 3 部分):弹性架构、全球交付

全文包括三部分: 第一部分:API 高可用和管理以及安全模型 第二部分:开放架构和混合云兼容 第三部分:弹性架构和全球交付 需求 5 - 扩展.弹性和性能 企业级的内容很丰富.过去,企业级往往和高可靠.高扩展和高性能的高质量系统相关.渐渐地,企业级的含义开始演变为 ”云级(coud-grade)“ 或者 ”网络级规模(web-scale)“.我想表达的是,随着 IT 时代向下一代应用演进,以及企业纷纷采用新的 IT 模型,交付一个高质量系统的需求也发生了很大的变化. 我喜欢的一个例子是 Hado

openstack概述

防伪码:有朝一日龙腾水,我让长江水倒流. 如何理解云? 云是基于"云计算"技术,实现各种终端设备之间的互联互通.手机.电视机等都只是一个单纯的显示和操作终端,它们不再需要具备强大的处理能力.用户享受的所有资源.所有应用程序全部都由一个存储和运算能力超强的云端后台来提供.像我们现在经常使用的在线杀毒.网络硬盘.在线音乐等都属于云服务范畴. 云计算的概念可以从用户.技术提供商和技术开发人员三个不同角度来解读. 用户看云计算 从用户的角度考虑,主要根据用户的体验和效果来描述,云计算可以总结为

Source Multiplayer Networking【转】

https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking Multiplayer games based on the Source Engine use a Client-Server networking architecture. Usually a server is a dedicated host that runs the game and is authoritative about world

Checked Exceptions

记得当年在程序员杂志上看出这次访谈,10多年过去了, 这件事儿最近被重提了, 原因是 Kotlin. 1.对Checked Exceptions特性持保留态度 (译者注:在写一段程序时,如果没有用try-catch捕捉异常或者显式的抛出异常,而希望程序自动抛出,一些语言的编译器不会允许编译通过,如Java就是这样.这就是Checked Exceptions最基本的意思.该特性的目的是保证程序的安全性和健壮性.Zee&Snakey(MVP)对此有一段很形象的话,可以参见: http://www.b

Centos7系统配置上的变化(二)网络管理基础

原文 Centos7系统配置上的变化(二)网络管理基础 上篇简单介绍了CentOS 7 在服务和网络方面的一点变化,先前很多烂熟于心的操作指令已经不适用了,不管是否习惯,总要接受.熟悉这些变化. 写上篇的时候还没有最小安装的ISO(CentOS-7.0-1406-x86_64-Minimal.iso),后来安装了首先发现ifconfig.netstat.route.arp都没有了,在哪儿呢? view sourceprint? 1.[root@centos7 ~]# yum search ifc

在CentOS 7 mini版中使用ifconfig

众所周知,"ifconfig"命令用于配置GNU/Linux系统的网络接口.它显示网络接口卡的详细信息,包括IP地址,MAC地址,以及网络接口卡状态之类.但是,该命令已经过时了,而且在最小化版本的RHEL 7以及它的克隆版本CentOS 7,Oracle Linux 7和Scientific Linux 7中也找不到该命令.那么问题来了,怎么在Centos7中查看ip信息呢?怎么操作才能找回以前的习惯呢? 7版系统查看网络信息的命令 CentOS 7最小化系统,使用"ip a

CentOS 7最小化安装后找不到‘ifconfig’命令——修复小提示(转)

就像我们所知道的,“ifconfig”命令用于配置GNU/Linux系统的网络接口.它显示网络接口卡的详细信息,包括IP地址,MAC地址,以及网络接口卡状态之类.但是,该命令已经过时了,而且在最小化版本的RHEL 7以及它的克隆版本CentOS 7,Oracle Linux 7和Scientific Linux 7中也找不到该命令. 在CentOS最小化服务器版本中如何查找网卡IP和其它详细信息? CentOS 7最小化系统,使用“ip addr”和“ip link”命令来查找网卡详情.要知道统