Jumat, 23 Februari 2018

membuat tampilan sapa dengan android eclipse portable

Hello XXX

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <TextView
        android:id="@+id/tvSalam"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

    <EditText
        android:id="@+id/etNama"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/tvSalam"
        android:layout_below="@+id/etNama"
        android:layout_marginTop="16dp"
        android:layout_toLeftOf="@+id/bSapa"
        android:ems="10"
        android:inputType="textPersonName" >

        <requestFocus />
    </EditText>

    <Button
        android:id="@+id/bSapa"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@+id/editText1"
        android:onClick="bSapaClick"
        android:layout_marginRight="25dp"
        android:text="Sapa" />


</RelativeLayout>


Graphical Layout




Main Activity.java

package com.helloword;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
   
    public void bSapaClick(View v){
        EditText etNama = (EditText) findViewById(R.id.etNama);
        TextView tvSalam = (TextView) findViewById(R.id.tvSalam);
        String nama = etNama.getText().toString();
        tvSalam.setText("Hallo "+nama+" senang bertemu dengan anda!");
   
    }
   
}


Layout running




Kamis, 22 Februari 2018

Latihan Membuat Radio Button menggunakan Android Eclipse portable

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/button1"
        android:onClick="klikHasilRadio"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/tvHasilRadio"
        android:layout_centerVertical="true"
        android:text="Hasil" />

    <TextView
        android:id="@+id/tvHasilRadio"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/button1"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="46dp"
        android:text="Pilih salah satu klik Button"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <RadioGroup
        android:id="@+id/rgJenisKel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/tvHasilRadio"
        android:layout_alignParentTop="true" >

        <RadioButton
            android:id="@+id/rbLaki"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:checked="true"
            android:text="Laki-laki" />

        <RadioButton
            android:id="@+id/rbPerempuan"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Perempuan" />
    </RadioGroup>

</RelativeLayout>


Graphical Layout

Layout Radio Button menggunakan Radio Button grup



Main Activity.java


package com.radiobutton;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.RadioGroup;
import android.widget.TextView;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
   
    public void klikHasilRadio(View v){
                TextView tvHasilRadio = (TextView) findViewById(R.id.tvHasilRadio);
                RadioGroup rgJenisKel = (RadioGroup) findViewById(R.id.rgJenisKel);
                int id = rgJenisKel.getCheckedRadioButtonId();
                String s = "";
                if (id == R.id.rbPerempuan){
                                s = "Perempuan";
                } else
                                if (id == R.id.rbLaki){
                                                s = "Laki-laki";
                                } else {
                                                s = "Tidak ada yang dipilih";
                                }
                tvHasilRadio.setText(s);
    }
}

Layout Running

ketika memilih Radio Button Laki-laki, maka ditombol Hasil muncul Laki-laki




ketika memilih Radio Button Perempuan, maka ditombol Hasil muncul Perempuan





Latihan Membuat Check Box dengan android eclipse portable

Activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <CheckBox
        android:id="@+id/cbJava"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Java" />

    <CheckBox
        android:id="@+id/cbPhp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/cbJava"
        android:layout_below="@+id/cbJava"
        android:layout_marginTop="25dp"
        android:text="Php" />

    <Button
        android:id="@+id/bHasil"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/cbPhp"
        android:layout_below="@+id/cbPhp"
        android:layout_marginLeft="17dp"
        android:layout_marginTop="82dp"
        android:onClick="bHasilClick"
        android:text="Hasil" />

    <TextView
        android:id="@+id/tvHasilradio"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/cbJava"
        android:layout_below="@+id/cbPhp"
        android:layout_marginTop="27dp"
        android:text="Pilih lalu klik Button"
        android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>

Graphical Layout



MainActivity.java

package com.checkbox;

import android.R.string;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.CheckBox;
import android.widget.RadioGroup;
import android.widget.TextView;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
   
    public void bHasilClick(View v){
                TextView tvHasilradio = (TextView) findViewById(R.id.tvHasilradio);
                CheckBox cbJava = (CheckBox) findViewById(R.id.cbJava);
                CheckBox cbPhp = (CheckBox) findViewById(R.id.cbPhp);
               
                String s="";
                if (cbJava.isChecked()){
                                s ="Java";
                }
                if (cbPhp.isChecked()){
                                s = s + "PHP";
                }
                tvHasilradio.setText(s);
    }
}

Layout Running







Sabtu, 10 Februari 2018

quis chapter 11 CCNA

1. Match the type of threat with the cause. (Not all options are used.)
hardware threats - physical damage to servers
environmental threats - temperature extremes
electrical threats - voltage spikes
maintenance threats - poor hadling
Other Incorrect Match Options:
unauthorized access resulting in loss of data
Refer to curriculum topic: 11.2.1
Physical threats can be classified into four categories:

Environmental threats -Temperature extremes (too hot or too cold) or humidity extremes (too wet or too dry)
Hardware threats - Physical damage to servers, routers, switches, cabling plant, and workstations
Electrical threats - Voltage spikes, insufficient supply voltage (brownouts), unconditioned power (noise), and total power loss
Maintenance threats - Poor handling of key electrical components (electrostatic discharge), lack of critical spare parts, poor cabling, and poor labeling

2. What type of traffic would most likely have the highest priority through the network?
  FTP
  instant messaging
  voice *
  SNMP
Refer to curriculum topic: 11.1.1
Not all traffic should receive the same treatment or priority through a network. Some types of traffic, such as voice and video, require the highest priority because they are very sensitive to network latency and delay. Other types of traffic, such as FTP which is not sensitive to latency and delay, should be given the lowest levels of priority so that the higher priority traffic can get through.


3. Which statement is true about Cisco IOS ping indicators??
  '!' indicates that the ping was unsuccessful and that the device may have issues finding a DNS server.
  'U' may indicate that a router along the path did not contain a route to the destination address and that the ping was unsuccessful. *
  '.' indicates that the ping was successful but the response time was longer than normal.
  A combination of '.' and '!' indicates that a router along the path did not have a route to the destination address and responded with an ICMP unreachable message.?
Refer to curriculum topic: 11.3.1
The most common indicators of a ping issued from the Cisco IOS are "!", ".", and "U". The "!" indicates that the ping completed successfully, verifying connectivity at Layer 3. The "." may indicate that a connectivity problem, routing problem, or device security issue exists along the path and that an ICMP destination unreachable message was not provided. The "U" indicates that a router along the path may not have had a route to the destination address, and that it responded with an ICMP unreachable message.

 
4. Which protocol is used by the traceroute command to send and receive echo-requests and echo-replies?
  SNMP 
  ICMP *
  Telnet 
  TCP 
Refer to curriculum topic: 11.3.2
Traceroute uses the ICMP (Internet Control Message Protocol) to send and receive echo-request and echo-reply messages.

 
5. A small company has only one router as the exit point to its ISP. Which solution could be adopted to maintain connectivity if the router itself, or its connection to the ISP, fails?
  Activate another router interface that is connected to the ISP, so the traffic can flow through it.
  Have a second router that is connected to another ISP. *
  Purchase a second least-cost link from another ISP to connect to this router. 
  Add more interfaces to the router that is connected to the internal network. 
Refer to curriculum topic: 11.1.1
Small networks generally have only one link to an ISP to establish a connection to the Internet. Problems can occur in the network, which can cause the disruption of this service. In order to keep connectivity, redundancy has to be provided. If the problem is in the router interface that is connected to the ISP, another interface can be activated on the router, so if one interface fails, traffic may be redirected toward the other interface. However, if the router itself fails, a second router that is connected to another ISP can be used as a backup.


6. On which two interfaces or ports can security be improved by configuring executive timeouts? (Choose two.)
  Fast Ethernet interfaces 
  console ports *
  serial interfaces 
  vty ports *
  loopback interfaces 
Refer to curriculum topic: 11.2.4
Executive timeouts allow the Cisco device to automatically disconnect users after they have been idle for the specified time. Console, vty, and aux ports can be configured with executive timeouts.

 
7. Which element of scaling a network involves identifying the physical and logical topologies?
  traffic analysis 
  network documentation * 
  device inventory 
  cost analysis 
Refer to curriculum topic: 11.1.3
To scale a network, several elements are required:

Network documentation - physical and logical topology
Device Inventory - list of devices that use or make up the network 
Budget - Itemized IT budget, including fiscal year equipment purchasing budget
Traffic analysis - protocols, applications, and services and their respective traffic requirements should be documented

8. 


Refer to the exhibit. The exhibited configuration is entered by a network administrator into a new router. Sometime later a network technician proceeds to log in to the router via a console connection. The technician enters techadmin as the user name and tries a password of 63t0ut0fh3r3!. What will be the result of this action?

  The router will deny access and display an error message. 
  The router will deny access and display a banner message. 
  The router will display the DT_ATC_RS3> prompt. *
  The router will be locked for 2 minutes and 30 seconds. 
Refer to curriculum topic: 11.2.4
Whenever an administrator connects to the console port, the configuration applied under the line con 0 interface determines how the user is authenticated. The console port configuration has the login command with local as the keyword. That means the username and password are required before the administrator is even allowed to see the enable mode prompt. Because the correct username and password was typed, the administrator will be presented with the enable mode prompt.

 
9. How should traffic flow be captured in order to best understand traffic patterns in a network?
  during low utilization times 
  during peak utilization times * 
  when it is on the main network segment only 
  when it is from a subset of users 
Refer to curriculum topic: 11.1.3
Capturing traffic during low utilization time will not give a good representation of the different traffic types. Because some traffic could be local to a particular segment, the  capture must be done on different network segments.

 
10. What is considered the most effective way to mitigate a worm attack?
  Change system passwords every 30 days. 
  Ensure that all systems have the most current virus definitions. 
  Ensure that AAA is configured in the network. 
  Download security updates from the operating system vendor and patch all vulnerable systems. *
Refer to curriculum topic: 11.2.3
Because worms take advantage of vulnerabilities in the system itself, the most effective way to mitigate worm attacks is to download security updates from the operating system vendor and patch all vulnerable systems.  

 
11. What is one of the most effective security tools available for protecting users from external threats?
  firewalls *
  router that run AAA services 
  patch servers 
  password encryption techniques 
Refer to curriculum topic: 11.2.3
A firewall is one of the most effective security tools for protecting internal network users from external threats.  A firewall resides between two or more networks, controls the traffic between them, and helps prevent unauthorized access. A host intrusion prevention system can help prevent outside intruders and should be used on all systems.

12. A network technician is investigating network connectivity from a PC to a remote host with the address 10.1.1.5. Which command, when issued on a Windows PC, will display the path to the remote host?
  trace 10.1.1.5
  traceroute 10.1.1.5
  tracert 10.1.1.5 *
  ping 10.1.1.5
Refer to curriculum topic: 11.3.2
The tracert command is used to initiate a trace from the command prompt on a Windows PC. The traceroute command is used to initiate a trace from a Cisco router or switch. Some other PC operating systems, such as Linux and Mac OS also use the traceroute command. The ping command does not display the network path to the remote host.

 
13. Fill in the blank. 
Network services use........... to define a set of rules that govern how devices communicate and the data formats used in a network.
Answer :
Protocols

Refer to curriculum topic: 11.1.2
Each application or network service uses protocols, which define the standards and data formats to be used. Without protocols, the data network would not have a common way to format and direct data.

 
14. Which process failed if a computer cannot access the Internet and received an IP address of 169.254.142.5?
  IP 
  DNS 
  DHCP * 
  HTTP 
Refer to curriculum topic: 11.4.3
When a Windows computer cannot communicate with an IPv4 DHCP server, the computer automatically assigns itself an IP address in the169.254.0.0/16 range. Linux and Apple computers do not automatically assign an IP address.

15. Which command will block login attempts on RouterA for a period of 30 seconds if there are 2 failed login attempts within 10 seconds?
  RouterA(config)# login block-for 10 attempts 2 within 30
  RouterA(config)# login block-for 30 attempts 2 within 10 *
  RouterA(config)# login block-for 2 attempts 30 within 10
  RouterA(config)# login block-for 30 attempts 10 within 2
Refer to curriculum topic: 11.2.4
The correct syntax is RouterA(config)# login block-for (number of seconds) attempts (number of attempts) within (number of seconds).

 
16. An administrator wants to back up a router configuration file to a USB drive that is connected to the router. Which command should the administrator use to verify that the USB drive is being recognized by the router?
  pwd
  cd USB
  dir flash0:
  show file systems *
Refer to curriculum topic: 11.2.5
The show file systems command displays all of the available file systems on the device. If usbflash0: appears then the router recognizes the USB drive as a valid storage device. The pwd command shows the current directory being navigated, and the cd command is used to change the current directory. The dir flash0: command will show the contents of flash memory, not the USB drive.

 
17. particular website does not appear to be responding on a Windows 7 computer. What command could the technician use to show any cached DNS entries for this web page?
  ipconfig /all
  arp -a
  ipconfig /displaydns *
  nslookup
Refer to curriculum topic: 11.3.4

quis chapter 10 CCNA

1. What is an advantage of SMB over FTP??
  Only with SMB can data transfers occur in both directions.
  Only SMB establishes two simultaneous connections with the client, making the data transfer faster.
  SMB is more reliable than FTP because SMB uses TCP and FTP uses UDP.
  SMB clients can establish a long-term connection to the server. *
Refer to curriculum topic: 10.2.3
SMB and FTP are client/server protocols that are used for file transfer. SMB allows the connecting device to access resources as if they were on the local client device. SMB and FTP use the TCP protocol for connection establishment and they can transfer data in both directions. FTP requires two connections between the client and the server, one for commands and replies, the other for the actual file transfer.


2. What is true about a client-server network?
  The network includes a dedicated server. *
  Each device can function as a server and a client.
  Workstations access network resources using SAMBA or Gnutella.
  Each peer accesses an index server to get the location of a resource stored on another peer in what is considered a hybrid network system.
Refer to curriculum topic: 10.1.2
In a client-server network, a dedicated server responds to service requests from clients. The roles of client and server are not shared on each host in the network. In a peer-to-peer network, computers are connected via a network and can share resources. Each host can function as a server or a client based on the nature of the transaction and what resources are used or requested. A hybrid network is one in which a server supplies index information that enables a peer to locate resources on other peers. In this case the peers can still have the role of client or server depending on the nature of the network transaction.


3. True or False?

In FTP transactions, an FTP client uses the pull method to download files from an FTP server.
  true *
  false 
Refer to curriculum topic: 10.2.3
The File Transfer Protocol (FTP) is a commonly used application layer protocol. FTP allows for data transfers between a client and a server. During data transfers, the FTP client downloads (pulls) data from the server. The FTP client can also upload (push) data to the server.

 
4. Why is DHCP preferred for use on large networks?
  Large networks send more requests for domain to IP address resolution than do smaller networks.
  DHCP uses a reliable transport layer protocol. 
  It prevents sharing of files that are copyrighted. 
Correct!
  It is a more efficient way to manage IP addresses than static address assignment.
  Hosts on large networks require more IP addressing configuration settings than hosts on small networks.
Refer to curriculum topic: 10.2.2
Static IP address assignment requires personnel to configure each network host  with addresses manually. Large networks can change frequently and have many more hosts to configure than do small networks. DHCP provides a much more efficient means of configuring and managing IP addresses on large networks than does static address assignment.

 
5. What is a common protocol that is used with peer-to-peer applications such as WireShare, Bearshare, and Shareaza?
  Ethernet 
  Gnutella * 
  POP 
  SMTP 
Refer to curriculum topic: 10.1.2
The Gnutella protocol is used when one user shares an entire file with another user. A person would load a Gnutella-based application such as gtk-gnutella or WireShare and use that application to locate and access resources shared by others.

 
6. A user is attempting to access http://www.cisco.com/ without success. Which two configuration values must be set on the host to allow this access? (Choose two.)
  DNS server *
  source port number 
  HTTP server 
  default gateway * 
  source MAC address 
Refer to curriculum topic: 10.2.2
In order to use a URL such as http://www.cisco.com, the DNS protocol must be used in order to translate the URL into an IP address. Furthermore, the host device requesting this web page must have a default gateway configured in order to communicate with remote networks.

 
7. What type of information is contained in a DNS MX record?
  the FQDN of the alias used to identify a service 
  the IP address for an FQDN entry 
  the domain name mapped to mail exchange servers *
  the IP address of an authoritative name server 
Refer to curriculum topic: 10.2.2
MX, or mail exchange messages, are used to map a domain name to several mail exchange servers that all belong to the same domain.


8. Which TCP/IP model layer is closest to the end user?
  application *
  internet 
  network access 
  transport 
Refer to curriculum topic: 10.1.1
End users use applications to interact with and use the network. The application layer of the TCP/IP model is closest to the end user. Application layer protocols are used to communicate and exchange messages with other network devices and applications. The layers of the TCP/IP model are from top to bottom (memory aid - ATIN): application, transport, internet, network access

 
9. Which command is used to manually query a DNS server to resolve a specific host name?
  nslookup *
  ipconfig /displaydns
  tracert
  ping
Refer to curriculum topic: 10.2.2
The nslookup command was created to allow a user to manually query a DNS server to resolve a given host name. The ipconfig /displaydns command only displays previously resolved DNS entries. The tracert command was created to examine the path that packets take as they cross a network and can resolve a hostname by automatically querying a DNS server. The ping command was created to test reachability on a network and can resolve a hostname by automatically querying a DNS server.

 
10. A wired laser printer is attached to a home computer. That printer has been shared so that other computers on the home network can also use the printer. What networking model is in use?
  peer-to-peer (P2P) * 
  client-based 
  master-slave 
  point-to-point 
Refer to curriculum topic: 10.1.2
Peer-to-peer (P2P) networks have two or more network devices that can share resources such as printers or files without having a dedicated server.


11. Which three layers of the OSI model provide similar network services to those provided by the application layer of the TCP/IP model? (Choose three.)
  physical layer 
  session layer *
  transport layer 
  application layer * 
  presentation layer *
  data link layer 
Refer to curriculum topic: 10.1.1
The three upper layers of the OSI model, the session, presentation, and application layers, provide application services similar to those provided by the TCP/IP model application layer. Lower layers of the OSI model are more concerned with data flow.

 
12. On a home network, which device is most likely to provide dynamic IP addressing to clients on the home network?
  a home router *
  an ISP DHCP server 
  a DNS server 
Refer to curriculum topic: 10.2.2
On a home network, a home router usually serves as the DHCP server. The home router is responsible for dynamically assigning IP addresses to clients on the home network. ISPs also use DHCP, but it usually assigns an IP address to the Internet interface of the home router, not the clients on the home network. In businesses, it is common to have a file or other dedicated server provide DHCP services to the network. Finally, a DNS server is responsible for finding the IP address for a URL, not for providing dynamic addressing to network clients.

 
13. Which three protocols or standards are used at the application layer of the TCP/IP model? (Choose three.)
  TCP 
  HTTP * 
  MPEG *
  GIF *
  IP 
  UDP 
Refer to curriculum topic: 10.1.1
HTTP, MPEG, and GIF operate at the application layer of the TCP/IP model. TCP and UDP operate at the transport layer. IP operates at the internet layer.

 
14. Which protocol can be used to transfer messages from an email server to an email client?
  SMTP 
  POP3 *
  SNMP 
  HTTP 
Refer to curriculum topic: 10.2.1
SMTP is used to send mail from the client to the server but POP3 is used to download mail from the server to the client. HTTP and SNMP are protocols that are unrelated to email.

quis chapter 9 CCNA

1. Which transport layer feature is used to guarantee session establishment?
TCP 3-way handshake *
Refer to curriculum topic: 9.2.1
TCP uses the 3-way handshake. UDP does not use this feature. The 3-way handshake ensures there is connectivity between the source and destination devices before transmission occurs.

2. Which two services or protocols use the preferred UDP protocol for fast transmission and low overhead? (Choose two)
DNS *
VoIP *
Refer to curriculum topic: 9.2.4
Both DNS and VoIP use UDP to provide low overhead services within a network implementation.

3. What type of applications are best suited for using UDP?
  applications that are sensitive to delay *
Refer to curriculum topic: 9.2.3
UDP is not a connection-oriented protocol and does not provide retransmission, sequencing, or flow control mechanisms. It provides basic transport layer functions with  a much lower overhead than TCP. Lower overhead makes UDP suitable for applications which are sensitive to delay.

4. Which action is performed by a client when establishing communication with a server via the use of UDP at the transport layer?
The client randomly selects a source port number. *
Refer to curriculum topic: 9.2.3
Because a session does not have to be established for UDP, the client selects a random source port to begin a connection. The random port number selected is inserted into the source port field of the UDP header.

5. Network congestion has resulted in the source learning of the loss of TCP segments that were sent to the destination. What is one way that the TCP protocol addresses this?
The source decreases the amount of data that it transmits before it receives an acknowledgement from the destination. *
Refer to curriculum topic: 9.2.2
If the source determines that the TCP segments are either not being acknowledged or are not acknowledged in a timely manner, then it can reduce the number of bytes it sends before receiving an acknowledgment. This does not involve changing the window size in the segment header. The source does not decrease the window size that is sent in the segment header. The window size in the segment header is adjusted by the destination host when it is receiving data faster than it can process it, not when network congestion is encountered.

6. A client application needs to terminate a TCP communication session with a server. Place the termination process steps in the order that they will occur. (Not all options are used.)
step 1 - client sends FI
step 2 - server sends ACK
step 3 - server sends FIN
step 4 - client sends ACK
Other Incorrect Match Options:
client sends SYN
server sends SYN
Refer to curriculum topic: 9.2.1
In order to terminate a TCP session, the client sends to the server a segment with the FIN flag set. The server acknowledges the client by sending a segment with the ACK flag set. The server sends a FIN to the client to terminate the server to client session. The client acknowledges the termination by sending a segment with the ACK flag set.


7. What are three responsibilities of the transport layer? (Choose three.)
 Meeting the reliability requirements of applications, if any *
 Multiplexing multiple communication streams from many users 
  or applications on the same network *
  Identifying the applications and services on the client and server 
  that should handle transmitted data *
  Directing packets towards the destination network 
  Formatting data into a compatible form for receipt by the destination devices
  conducting error detection of the contents in frames 
Refer to curriculum topic: 9.1.1
The transport layer has several responsibilities. Some of the primary responsibilities include the following:

Tracking the individual communication streams between applications on the source and destination
Segmenting data at the source and reassembling the data at the destination
Identifying the proper application for each communication stream through the use of port numbers
Multiplexing the communications of multiple users or applications over a single network
Managing the reliability requirements of applications

8. What OSI layer is responsible for establishing a temporary communication session between two applications and ensuring that transmitted data can be reassembled in proper sequence?
  transport *
  network 
  data link 
  session 
Refer to curriculum topic: 9.1.1
The transport layer of the OSI model has several responsibilities. One of the primary responsibilities is to segment data into blocks that can be reassembled in proper sequence at the destination device.

9. What is the purpose of using a source port number in a TCP communication?
  to notify the remote device that the conversation is over 
  to assemble the segments that arrived out of order 
  to keep track of multiple conversations between devices * 
  to inquire for a nonreceived segment 
Refer to curriculum topic: 9.1.2
The source port number in a segment header is used to keep track of multiple conversations between devices. It is also used to keep an open entry for the response from the server. The incorrect options are more related to flow control and guaranteed delivery.


10.  What is an advantage of UDP over TCP?
  UDP communication requires less overhead. * 
  UDP communication is more reliable. 
  UDP reorders segments that are received out of order. 
  UDP acknowledges received data. 
Refer to curriculum topic: 9.1.2
TCP is a more reliable protocol and uses sequence numbers to realign packets that arrive out of order at the destination. Both UDP and TCP use port numbers to identify applications. UDP has less overhead than TCP because the UDP header has fewer bytes and UDP does not confirm the receipt of packets.

11.

Refer to the exhibit. What does the value of the window size specify?

  the amount of data that can be sent at one time 
  the total number of bits received during this TCP session 
  the amount of data that can be sent before an acknowledgment is required *
  a random number that is used in establishing a connection with the 3-way handshake
Refer to curriculum topic: 9.2.2
The window size specifies the amount of data that can be sent before an acknowledgment is received from the receiver. This value specifies the highest number of bytes, not the required number of bytes.

12. Which three fields are used in a UDP segment header? (Choose three.)
  Window Size 
  Length *
  Source Port * 
  Acknowledgment Number 
  Checksum *
  Sequence Number 
Refer to curriculum topic: 9.1.2
A UDP header consists of only the Source Port, Destination Port, Length, and Checksum fields. Sequence Number, Acknowledgment Number, and Window Size are TCP header fields.

13. Which number or set of numbers represents a socket?
  01-23-45-67-89-AB 
  21 
  192.168.1.1:80 *
  10.1.1.15 
Refer to curriculum topic: 9.1.2
A socket is defined by the combination of an IP address and a port number, and uniquely identifies a particular communication.

14. What is the purpose of the TCP sliding window?
  to inform a source to retransmit data from a specific point forward 
  to request that a source decrease the rate at which it transmits data *
  to end communication when data transmission is complete 
  to ensure that segments arrive in order at the destination 
Refer to curriculum topic: 9.2.2
The TCP sliding window allows a destination device to inform a source to slow down the rate of transmission. To do this, the destination device reduces the value contained in the window size field of the segment. It is acknowledgment numbers that are used to specify retransmission from a specific point forward. It is sequence numbers that are used to ensure segments arrive in order. Finally, it is a FIN control bit that is used to end a communication session.




Kamis, 08 Februari 2018

quis chapter 8 CCNA

1. Three devices are on three different subnets. Match the network address and the broadcast address with each subnet where these devices are located. (Not all options are used.)

Device 1: IP address 192.168.10.77/28 on subnet 1

Device 2: IP address192.168.10.17/30 on subnet 2

Device 3: IP address 192.168.10.35/29 on subnet 3

Subnet 1 network number 
192.168.10.64
Subnet 1 broadcast address 
192.168.10.79
Subnet 2 network number 
192.168.10.16
Subnet 2 broadcast address 
192.168.10.19
Subnet 3 network number 
192.168.10.32

Refer to curriculum topic: 8.1.5
To calculate any of these addresses, write the device IP address in binary. Draw a line showing where the subnet mask 1s end. For example, with Device 1, the final octet (77) is 01001101. The line would be drawn between the 0100 and the 1101 because the subnet mask is /28. Change all the bits to the right of the line to 0s to determine the network number (01000000 or 64). Change all the bits to the right of the line to 1s to determine the broadcast address (01001111 or 79).

 
2. Three methods allow IPv6 and IPv4 to co-exist. Match each method with its description. (Not all options are used.)
The IPv4 packets and IPv6 packets coexist in the same network. 
dual-satck
The IPv6 packet is transported inside an IPv4 packet. 
tunneling
IPv6 packets are converted into IPv4 packets, and vice versa. 
translation
Refer to curriculum topic: 7.2.1
The term for the method that allows for the coexistence of the two types of packets on a single network is dual-stack. Tunneling allows for the IPv6 packet to be transported inside IPv4 packets. An IP packet can also be converted from version 6 to version 4 and vice versa. DHCP is a protocol that is used for allocating  network parameters to hosts on an IP network.


3. An administrator wants to create four subnetworks from the network address 192.168.1.0/24. What is the network address and subnet mask of the second useable subnet?
  subnetwork 192.168.1.64
subnet mask 255.255.255.192
Refer to curriculum topic: 8.1.4
The number of bits that are borrowed would be two, thus giving a total of 4 useable subnets:
192.168.1.0
192.168.1.64
192.168.1.128
192.168.1.192
Because 2 bits are borrowed, the new subnet mask would be /26 or 255.255.255.192

4. Refer to the exhibit. Which two network addresses can be assigned to the network containing 10 hosts? Your answers should waste the fewest addresses, not reuse addresses that are already assigned, and stay within the 10.18.10.0/24 range of addresses. (Choose two.)

  10.18.10.208/28 *
  10.18.10.224/28  *

Refer to curriculum topic: 8.1.5
Addresses 10.18.10.0 through 10.18.10.63 are taken for the leftmost network. Addresses 192 through 199 are used by the center network. Because 4 host bits are needed to accommodate 10 hosts, a /28 mask is needed. 10.18.10.200/28 is not a valid network number. Two subnets that can be used are 10.18.10.208/28 and 10.18.10.224/28.

5. A network engineer is subnetting the 10.0.240.0/20 network into smaller subnets. Each new subnet will contain between a minimum of 20 hosts and a maximum of 30 hosts. Which subnet mask will meet these requirements?
  255.255.255.224 
Refer to curriculum topic: 8.1.4
For each new subnet to contain between 20 and 30 hosts, 5 host bits are required. When 5 host bits are being used, 27 network bits are remaining. A /27 prefix provides the subnet mask of 255.255.255.224.


6. A network administrator subnets the 192.168.10.0/24 network into subnets with /26 masks. How many equal-sized subnets are created?
  4 
Refer to curriculum topic: 8.1.2
The normal mask for 192.168.10.0 is /24. A /26 mask indicates 2 bits have been borrowed for subnetting. With 2 bits, four subnets of equal size could be created.?


7. Fill in the blank.
The last host address on the 10.15.25.0/24 network is  .........................
Answer :
10.15.25.254
Refer to curriculum topic: 7.1.2
The host portion of the last host address will contain all 1 bits with a 0 bit for the lowest order or rightmost bit. This address is always one less than the broadcast address. The range of addresses for the network 10.15.25.0/24 is 10.15.25.0 (network address) through 10.15.25.255 (broadcast address). So the last host address for this network is 10.15.25.254.

8. The network portion of the address 172.16.30.5/16 is  ..............................
Answer :
 172.16
Refer to curriculum topic: 7.1.2
A prefix of /16 means that 16 bits are used for the network part of the address. The network portion of the address is therefore 172.16.


9. What are two benefits of subnetting networks? (Choose two.)
  combining multiple smaller networks into larger networks 
  reducing the size of broadcast domains  *
grouping devices to improve management and security *
Refer to curriculum topic: 8.1.1
When a single network is subnetted into multiple networks the following occurs:
A new broadcast domain is created for every network that is created through subnetting.
The amount of network traffic that crosses the entire network decreases.
Devices can be grouped together to improve network management and security.
More IP addresses are usable because each network will have a network address and broadcast address.


10. A network administrator has received the IPv6 prefix 2001:DB8::/48 for subnetting. Assuming the administrator does not subnet into the interface ID portion of the address space, how many subnets can the administrator create from the /48 prefix?
65536 * 
Refer to curriculum topic: 8.3.1
With a network prefix of 48, there will be 16 bits available for subnetting because the interface ID starts at bit 64. Sixteen bits will yield 65536 subnets.


11. What does the IP address 192.168.1.15/29 represent?
broadcast address  *
Refer to curriculum topic: 8.1.2
A broadcast address is the last address of any given network. This address cannot be assigned to a host, and it is used to communicate with all hosts on that network.


12. What is the subnet address for the IPv6 address 2001:D12:AA04:B5::1/64?
2001:D12:AA04:B5::/64? 
Refer to curriculum topic: 8.3.1
The /64 represents the network and subnet IPv6 fields which are the first four groups of hexadecimal digits. The first address within that range is the subnetwork address of 2001: D12:AA04:B5::/64.?


13. How many host addresses are available on the 192.168.10.128/26 network?
62 *
Refer to curriculum topic: 8.1.2
A /26 prefix gives 6 host bits, which provides a total of 64 addresses, because 26 = 64. Subtracting the network and broadcast addresses leaves 62 usable host addresses.



14. A college has five campuses. Each campus has IP phones installed. Each campus has an assigned IP address range. For example, one campus has IP addresses that start with 10.1.x.x. On another campus the address range is 10.2.x.x. The college has standardized that IP phones are assigned IP addresses that have the number 4X in the third octet. For example, at one campus the address ranges used with phones include 10.1.40.x, 10.1.41.x, 10.1.42.x, etc. Which two groupings were used to create this IP addressing scheme? (Choose two.)
  geographic location *
  device type  *
Refer to curriculum topic: 8.1.1
The IP address design being used is by geographic location (for example, one campus is 10.1, another campus 10.2, another campus 10.3). The other design criterion is that the next octet number designates IP phones, or a specific device type, with numbers starting with 4, but which can include other numbers. Other devices that might get a designation inside this octet could be printers, PCs, and access points.